diff --git a/charts/flagger/templates/deployment.yaml b/charts/flagger/templates/deployment.yaml index 451ebf71..ed3e992d 100644 --- a/charts/flagger/templates/deployment.yaml +++ b/charts/flagger/templates/deployment.yaml @@ -48,11 +48,6 @@ spec: secret: secretName: "{{ .Values.kubeconfigHost }}" {{- end }} - {{- if .Values.kubeconfigSource }} - - name: kubeconfig-source - secret: - secretName: "{{ .Values.kubeconfigSource }}" - {{- end }} containers: - name: flagger securityContext: @@ -63,10 +58,6 @@ spec: - name: kubeconfig mountPath: "/tmp/istio-host" {{- end }} - {{- if .Values.kubeconfigSource }} - - name: kubeconfig-source - mountPath: "/tmp/istio-source" - {{- end }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: @@ -110,11 +101,8 @@ spec: {{- if .Values.eventWebhook }} - -event-webhook={{ .Values.eventWebhook }} {{- end }} - {{- if .Values.kubeconfigSource }} - - -kubeconfig=/tmp/istio-source/config1 - {{- end }} {{- if .Values.kubeconfigHost }} - - -kubeconfig-host=/tmp/istio-host/config1 + - -kubeconfig-host=/tmp/istio-host/kubeconfig {{- end }} livenessProbe: exec: diff --git a/charts/flagger/values.yaml b/charts/flagger/values.yaml index cbaafc5d..927fe54f 100644 --- a/charts/flagger/values.yaml +++ b/charts/flagger/values.yaml @@ -103,5 +103,4 @@ prometheus: # to be used with ingress controllers install: false -kubeconfigSource: "" -kubeconfigHost: "kubeconfig" +kubeconfigHost: "" diff --git a/cmd/flagger/main.go b/cmd/flagger/main.go index 4ee4d2f3..23d65aef 100644 --- a/cmd/flagger/main.go +++ b/cmd/flagger/main.go @@ -113,7 +113,7 @@ func main() { if err != nil { logger.Fatalf("Error building kubeconfig: %v", err) } - fmt.Println(cfg) + kubeClient, err := kubernetes.NewForConfig(cfg) if err != nil { logger.Fatalf("Error building kubernetes clientset: %v", err)