Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/kubemacpool/kubemacpool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ subjects:
apiVersion: v1
data:
RANGE_END: '{{ .RangeEnd }}'
RANGE_START: '{{ .RangeStart }}'
RANGE_START: "{{ .RangeStart }}"
kind: ConfigMap
metadata:
labels:
Expand Down
8 changes: 4 additions & 4 deletions data/kubevirt-ipam-controller/001-kubevirtipamcontroller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ spec:
containers:
- args:
- --leader-elect
- "--certificates-dir={{ .CertDir }}"
- --certificates-dir={{ .CertDir }}
{{- if ne .DefaultNetNADNs "" }}
- "--default-network-nad-namespace={{ .DefaultNetNADNs }}"
- --default-network-nad-namespace={{ .DefaultNetNADNs }}
{{ end }}
- "--tls-min-version={{ .TLSMinVersion }}"
- --tls-min-version={{ .TLSMinVersion }}
{{ if index . "TLSSecurityProfileCiphers" }}
- "--tls-cipher-suites={{ .TLSSecurityProfileCiphers }}"
- --tls-cipher-suites={{ .TLSSecurityProfileCiphers }}
{{ end }}
command:
- /manager
Expand Down
4 changes: 2 additions & 2 deletions data/multus/001-multus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ spec:
- name: cni
mountPath: /host/etc/cni/net.d
# multus-daemon expects that cnibin path must be identical between pod and container host.
# e.g. if the cni bin is in /opt/cni/bin on the container host side, then it should be mount to /opt/cni/bin in multus-daemon,
# not to any other directory, like /opt/bin or /usr/bin.
# e.g. if the cni bin is in '/opt/cni/bin' on the container host side, then it should be mount to '/opt/cni/bin' in multus-daemon,
# not to any other directory, like '/opt/bin' or '/usr/bin'.
- name: cnibin
mountPath: /opt/cni/bin
- name: host-run
Expand Down
2 changes: 1 addition & 1 deletion data/ovs/001-ovs-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
- sh
- -c
- >-
find /tmp/healthy -mmin -2 | grep -q /tmp/healthy
find /tmp/healthy -mmin -2 | grep -q '/tmp/healthy'
initialDelaySeconds: 60
periodSeconds: 60
terminationMessagePolicy: FallbackToLogsOnError
Expand Down
6 changes: 3 additions & 3 deletions hack/components/bump-bridge-marker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function __parametize_by_object() {
case "${f}" in
./ClusterRoleBinding_bridge-marker-crb.yaml)
yaml-utils::update_param ${f} subjects[0].namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ServiceAccount_bridge-marker.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./DaemonSet_bridge-marker.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
Expand All @@ -33,7 +33,7 @@ function __parametize_by_object() {
yaml-utils::set_param ${f} spec.template.spec.securityContext.runAsNonRoot 'true'
yaml-utils::set_param ${f} spec.template.spec.securityContext.runAsUser '1001'
yaml-utils::set_param ${f} spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem 'true'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
esac
done
Expand Down
10 changes: 5 additions & 5 deletions hack/components/bump-kube-secondary-dns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ function __parametize_by_object() {
case "${f}" in
./Namespace_secondary.yaml)
yaml-utils::update_param ${f} metadata.name '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ConfigMap_secondary-dns.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::set_param ${f} data.DOMAIN '{{ .Domain }}'
yaml-utils::set_param ${f} data.NAME_SERVER_IP '{{ .NameServerIp }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ClusterRoleBinding_secondary.yaml)
yaml-utils::update_param ${f} subjects[0].namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./Deployment_secondary-dns.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
Expand All @@ -36,11 +36,11 @@ function __parametize_by_object() {
yaml-utils::set_param ${f} spec.template.spec.tolerations '{{ toYaml .Placement.Tolerations | nindent 8 }}'
yaml-utils::set_param ${f} 'spec.template.metadata.annotations."openshift.io/required-scc"' '"restricted-v2"'
yaml-utils::set_param ${f} 'spec.template.metadata.labels."allow-access-cluster-services"' '""'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ServiceAccount_secondary.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./NetworkPolicy_allow-ingress-to-secondary-dns.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
Expand Down
30 changes: 15 additions & 15 deletions hack/components/bump-kubevirt-ipam-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,64 @@ function __parametize_by_object() {
case "${f}" in
./Namespace_kubevirt-ipam-controller-system.yaml)
yaml-utils::update_param ${f} metadata.name '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ClusterRoleBinding_kubevirt-ipam-controller-manager-rolebinding.yaml)
yaml-utils::update_param ${f} subjects[0].namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./Deployment_kubevirt-ipam-controller-manager.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::update_param ${f} spec.template.spec.containers[0].image '{{ .KubevirtIpamControllerImage }}'
yaml-utils::set_param ${f} spec.template.spec.containers[0].imagePullPolicy '{{ .ImagePullPolicy }}'
yaml-utils::set_param ${f} spec.template.spec.containers[0].args[1] '"--certificates-dir={{ .CertDir }}"'
yaml-utils::set_param ${f} spec.template.spec.containers[0].args[1] '--certificates-dir={{ .CertDir }}'
yaml-utils::set_param ${f} spec.template.spec.containers[0].volumeMounts[0].mountPath '{{ .MountPath }}'
yaml-utils::set_param ${f} spec.template.spec.volumes[0].secret.secretName '{{ .SecretName }}'
yaml-utils::set_param ${f} spec.template.spec.nodeSelector '{{ toYaml .Placement.NodeSelector | nindent 8 }}'
yaml-utils::set_param ${f} spec.template.spec.affinity '{{ toYaml .Placement.Affinity | nindent 8 }}'
yaml-utils::set_param ${f} spec.template.spec.tolerations '{{ toYaml .Placement.Tolerations | nindent 8 }}'
yaml-utils::set_param ${f} 'spec.template.metadata.labels."allow-access-cluster-services"' '""'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
# sed operation is done after all yq operations to avoid unexpected yq error
sed -i '/ - "--certificates-dir={{ .CertDir }}"/a{{ if index . "TLSSecurityProfileCiphers" }}\n - "--tls-cipher-suites={{ .TLSSecurityProfileCiphers }}"\n{{ end }}' ${f}
sed -i '/ - "--certificates-dir={{ .CertDir }}"/a\\ - "--tls-min-version={{ .TLSMinVersion }}"' ${f}
sed -i '/ - "--certificates-dir={{ .CertDir }}"/a{{- if ne .DefaultNetNADNs "" }}\n - "--default-network-nad-namespace={{ .DefaultNetNADNs }}"\n{{ end }}' ${f}
sed -i '/ - --certificates-dir={{ .CertDir }}/a{{ if index . "TLSSecurityProfileCiphers" }}\n - --tls-cipher-suites={{ .TLSSecurityProfileCiphers }}\n{{ end }}' ${f}
sed -i '/ - --certificates-dir={{ .CertDir }}/a\ - --tls-min-version={{ .TLSMinVersion }}' ${f}
sed -i '/ - --certificates-dir={{ .CertDir }}/a{{- if ne .DefaultNetNADNs "" }}\n - --default-network-nad-namespace={{ .DefaultNetNADNs }}\n{{ end }}' ${f}
;;
./Service_kubevirt-ipam-controller-webhook-service.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./Certificate_kubevirt-ipam-controller-serving-cert.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::update_param ${f} spec.dnsNames[0] 'kubevirt-ipam-controller-webhook-service.{{ .Namespace }}.svc'
yaml-utils::update_param ${f} spec.dnsNames[1] 'kubevirt-ipam-controller-webhook-service.{{ .Namespace }}.svc.cluster.local'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./Issuer_kubevirt-ipam-controller-selfsigned-issuer.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./MutatingWebhookConfiguration_kubevirt-ipam-controller-mutating-webhook-configuration.yaml)
yaml-utils::update_param ${f} webhooks[0].clientConfig.service.namespace '{{ .Namespace }}'
sed -i '/cert-manager.io\/inject-ca-from/c\ {{ .WebhookAnnotation }}' ${f}
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./RoleBinding_kubevirt-ipam-controller-leader-election-rolebinding.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::update_param ${f} subjects[0].namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./Role_kubevirt-ipam-controller-leader-election-role.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ServiceAccount_kubevirt-ipam-controller-manager.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./Service_kubevirt-ipam-controller-webhook-service.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./NetworkPolicy_kubevirt-ipam-controller-allow-ingress-to-ipam-ext-webhook.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
Expand Down
2 changes: 1 addition & 1 deletion hack/components/bump-macvtap-cni.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function __parametize_by_object() {
yaml-utils::set_param ${f} spec.template.spec.affinity '{{ toYaml .Placement.Affinity | nindent 8 }}'
yaml-utils::set_param ${f} spec.template.spec.nodeSelector '{{ toYaml .Placement.NodeSelector | nindent 8 }}'
yaml-utils::set_param ${f} spec.template.spec.tolerations '{{ toYaml .Placement.Tolerations | nindent 8 }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
esac
done
Expand Down
12 changes: 6 additions & 6 deletions hack/components/bump-multus-dynamic-networks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@ function __parametize_by_object() {
json_content=$(yaml-utils::get_param ${f} 'data."dynamic-networks-config.json"')
updated_json=$(echo "${json_content}" | sed -E "s|\"criSocketPath\": *\"[^\"]*\"|\"criSocketPath\": \"/host{{ .HostCRISocketPath }}\"|")
yaml-utils::set_param ${f} 'data."dynamic-networks-config.json"' "${updated_json}"$'\n'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ClusterRoleBinding_dynamic-networks-controller.yaml)
yaml-utils::update_param ${f} subjects[0].namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./DaemonSet_dynamic-networks-controller-ds.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::set_param ${f} spec.template.spec.containers[0].imagePullPolicy '{{ .ImagePullPolicy }}'
yaml-utils::update_param ${f} spec.template.spec.containers[0].image '{{ .MultusDynamicNetworksControllerImage }}'
yaml-utils::update_param ${f} spec.template.spec.containers[0].volumeMounts\(name=="cri-socket"\).mountPath '/host{{ .HostCRISocketPath }}'
yaml-utils::update_param ${f} '(.spec.template.spec.containers[0].volumeMounts[] | select(.name == "cri-socket")).mountPath' '/host{{ .HostCRISocketPath }}'
yaml-utils::set_param ${f} spec.template.spec.affinity '{{ toYaml .Placement.Affinity | nindent 8 }}'
yaml-utils::update_param ${f} spec.template.spec.tolerations '{{ toYaml .Placement.Tolerations | nindent 8 }}'
yaml-utils::update_param ${f} spec.template.spec.volumes\(name=="cri-socket"\).hostPath.path '{{ .HostCRISocketPath }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::update_param ${f} '(.spec.template.spec.volumes[] | select(.name == "cri-socket")).hostPath.path' '{{ .HostCRISocketPath }}'
yaml-utils::unquote_template_variables ${f}
;;
./ServiceAccount_dynamic-networks-controller.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
esac
done
Expand Down
10 changes: 5 additions & 5 deletions hack/components/bump-multus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function __parametize_by_object() {
case "${f}" in
./ClusterRoleBinding_multus.yaml)
yaml-utils::update_param ${f} subjects[0].namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ServiceAccount_multus.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ConfigMap_multus-daemon-config.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
Expand All @@ -33,13 +33,13 @@ function __parametize_by_object() {
yaml-utils::update_param ${f} spec.template.spec.volumes[0].hostPath.path '{{ .CNIConfigDir }}'
yaml-utils::update_param ${f} spec.template.spec.volumes[1].hostPath.path '{{ .CNIBinDir }}'
yaml-utils::delete_param ${f} spec.template.spec.containers[0].resources.limits
yaml-utils::update_param ${f} spec.template.spec.containers[0].resources.requests.cpu '"10m"'
yaml-utils::update_param ${f} spec.template.spec.containers[0].resources.requests.memory '"15Mi"'
yaml-utils::update_param ${f} spec.template.spec.containers[0].resources.requests.cpu '10m'
yaml-utils::update_param ${f} spec.template.spec.containers[0].resources.requests.memory '15Mi'
yaml-utils::set_param ${f} spec.template.spec.nodeSelector '{{ toYaml .Placement.NodeSelector | nindent 8 }}'
yaml-utils::set_param ${f} spec.template.spec.containers[0].lifecycle.preStop.exec.command '["/bin/sh", "-c", "rm -rf /host/etc/cni/net.d/00-multus.conf /host/var/lib/cni/*"]'
yaml-utils::set_param ${f} spec.template.spec.affinity '{{ toYaml .Placement.Affinity | nindent 8 }}'
yaml-utils::update_param ${f} spec.template.spec.tolerations '{{ toYaml .Placement.Tolerations | nindent 8 }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
esac
done
Expand Down
6 changes: 3 additions & 3 deletions hack/components/bump-ovs-cni.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function __parametize_by_object() {
case "${f}" in
./ClusterRoleBinding_ovs-cni-marker-crb.yaml)
yaml-utils::update_param ${f} subjects[0].namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./ServiceAccount_ovs-cni-marker.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
./DaemonSet_ovs-cni-amd64.yaml)
yaml-utils::update_param ${f} metadata.namespace '{{ .Namespace }}'
Expand All @@ -29,7 +29,7 @@ function __parametize_by_object() {
yaml-utils::update_param ${f} spec.template.spec.nodeSelector '{{ toYaml .Placement.NodeSelector | nindent 8 }}'
yaml-utils::set_param ${f} spec.template.spec.affinity '{{ toYaml .Placement.Affinity | nindent 8 }}'
yaml-utils::update_param ${f} spec.template.spec.tolerations '{{ toYaml .Placement.Tolerations | nindent 8 }}'
yaml-utils::remove_single_quotes_from_yaml ${f}
yaml-utils::unquote_template_variables ${f}
;;
esac
done
Expand Down
Loading
Loading