diff --git a/manifests/function/helm-operator/deployment.yaml b/manifests/function/helm-operator/deployment.yaml index 21719051e..c5b3f6774 100644 --- a/manifests/function/helm-operator/deployment.yaml +++ b/manifests/function/helm-operator/deployment.yaml @@ -45,6 +45,13 @@ spec: requests: cpu: 50m memory: 64Mi + env: + - name: http_proxy + value: REPLACEMENT_HTTP_PROXY + - name: https_proxy + value: REPLACEMENT_HTTPS_PROXY + - name: no_proxy + value: REPLACEMENT_NO_PROXY serviceAccountName: helm-operator # See https://github.com/fluxcd/flux/pull/2116 dnsPolicy: None diff --git a/manifests/function/helm-operator/replacements/helm-operator-env-vars.yaml b/manifests/function/helm-operator/replacements/helm-operator-env-vars.yaml new file mode 100644 index 000000000..f3f280bda --- /dev/null +++ b/manifests/function/helm-operator/replacements/helm-operator-env-vars.yaml @@ -0,0 +1,34 @@ +# These rules inject env vars into the helm-operator function. +apiVersion: airshipit.org/v1alpha1 +kind: ReplacementTransformer +metadata: + name: helm-operator-env-vars-replacements +replacements: +# Replace the proxy vars +- source: + objref: + name: env-vars-catalogue + fieldref: env.HTTP_PROXY + target: + objref: + kind: Deployment + name: helm-operator + fieldrefs: ["spec.template.spec.containers[name=helm-operator].env[name=http_proxy].value%REPLACEMENT_HTTP_PROXY%"] +- source: + objref: + name: env-vars-catalogue + fieldref: env.HTTPS_PROXY + target: + objref: + kind: Deployment + name: helm-operator + fieldrefs: ["spec.template.spec.containers[name=helm-operator].env[name=https_proxy].value%REPLACEMENT_HTTPS_PROXY%"] +- source: + objref: + name: env-vars-catalogue + fieldref: env.NO_PROXY + target: + objref: + kind: Deployment + name: helm-operator + fieldrefs: ["spec.template.spec.containers[name=helm-operator].env[name=no_proxy].value%REPLACEMENT_NO_PROXY%"] diff --git a/manifests/function/helm-operator/replacements/kustomization.yaml b/manifests/function/helm-operator/replacements/kustomization.yaml index 1d43ee154..ddee62ce3 100644 --- a/manifests/function/helm-operator/replacements/kustomization.yaml +++ b/manifests/function/helm-operator/replacements/kustomization.yaml @@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - versions.yaml + - helm-operator-env-vars.yaml diff --git a/manifests/site/test-site/target/workers/kubeadmconfigtemplate.yaml b/manifests/site/test-site/target/workers/kubeadmconfigtemplate.yaml index 4bd8d4b8d..20b070236 100644 --- a/manifests/site/test-site/target/workers/kubeadmconfigtemplate.yaml +++ b/manifests/site/test-site/target/workers/kubeadmconfigtemplate.yaml @@ -27,6 +27,20 @@ spec: net.bridge.bridge-nf-call-iptables = 1 EOF - sysctl --system + - | + mkdir -p /etc/systemd/system/docker.service.d/ + cat <