From af0aefd2e7b1ec07730a843e43e93f4527b6094c Mon Sep 17 00:00:00 2001 From: Ole Markus With Date: Tue, 6 Jul 2021 15:26:30 +0200 Subject: [PATCH] Use localhost as API address for CCM --- .../k8s-1.18.yaml.template | 19 +++++++++++-------- ...oud-controller.addons.k8s.io-k8s-1.18.yaml | 3 +++ .../awscloudcontroller/manifest.yaml | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/upup/models/cloudup/resources/addons/aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml.template b/upup/models/cloudup/resources/addons/aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml.template index 7cbe9d5fdb..5b3ca302d2 100644 --- a/upup/models/cloudup/resources/addons/aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml.template +++ b/upup/models/cloudup/resources/addons/aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml.template @@ -27,16 +27,19 @@ spec: effect: NoSchedule serviceAccountName: aws-cloud-controller-manager containers: - - name: aws-cloud-controller-manager - image: {{ if .ExternalCloudControllerManager.Image }}{{ .ExternalCloudControllerManager.Image }}{{ else }}gcr.io/k8s-staging-provider-aws/cloud-controller-manager:{{AWSCCMTag}}{{ end }} - imagePullPolicy: IfNotPresent - args: + - name: aws-cloud-controller-manager + image: {{ if .ExternalCloudControllerManager.Image }}{{ .ExternalCloudControllerManager.Image }}{{ else }}gcr.io/k8s-staging-provider-aws/cloud-controller-manager:{{AWSCCMTag}}{{ end }} + imagePullPolicy: IfNotPresent + args: {{- range $arg := CloudControllerConfigArgv }} - - {{ $arg }} + - {{ $arg }} {{- end }} - resources: - requests: - cpu: 200m + env: + - name: KUBERNETES_SERVICE_HOST + value: "127.0.0.1" + resources: + requests: + cpu: 200m hostNetwork: true priorityClassName: system-cluster-critical --- diff --git a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awscloudcontroller/aws-cloud-controller.addons.k8s.io-k8s-1.18.yaml b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awscloudcontroller/aws-cloud-controller.addons.k8s.io-k8s-1.18.yaml index 4057023b29..b9eb7c366f 100644 --- a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awscloudcontroller/aws-cloud-controller.addons.k8s.io-k8s-1.18.yaml +++ b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awscloudcontroller/aws-cloud-controller.addons.k8s.io-k8s-1.18.yaml @@ -27,6 +27,9 @@ spec: - --allocate-node-cidrs=true - --configure-cloud-routes=false - --use-service-account-credentials=true + env: + - name: KUBERNETES_SERVICE_HOST + value: 127.0.0.1 image: gcr.io/k8s-staging-provider-aws/cloud-controller-manager:latest imagePullPolicy: IfNotPresent name: aws-cloud-controller-manager diff --git a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awscloudcontroller/manifest.yaml b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awscloudcontroller/manifest.yaml index 980a6b9944..765d668f56 100644 --- a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awscloudcontroller/manifest.yaml +++ b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/awscloudcontroller/manifest.yaml @@ -47,7 +47,7 @@ spec: k8s-addon: storage-aws.addons.k8s.io - id: k8s-1.18 manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml - manifestHash: 9ca4820e2d12cabdb9b2d32c2f8f9b00e3e75a7f + manifestHash: ef74ee3b557b92e6e6944329c81e4f1925e2f3df name: aws-cloud-controller.addons.k8s.io selector: k8s-addon: aws-cloud-controller.addons.k8s.io