From fda58cb4da9980dae83b78813821f372d01547cc Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Mon, 23 Mar 2020 15:57:41 -0700 Subject: [PATCH] Remove use of -init-type=sync as it has no effect As part of https://github.com/hashicorp/consul-k8s/pull/232 we removed the docs about -init-type=sync. If -init-type was set to sync it actually had no effect. Only -init-type=client had effect so this change stops setting that flag in the case of sync. --- templates/client-snapshot-agent-deployment.yaml | 3 +-- templates/connect-inject-deployment.yaml | 3 +-- templates/enterprise-license-job.yaml | 3 +-- templates/mesh-gateway-deployment.yaml | 1 - templates/sync-catalog-deployment.yaml | 3 +-- test/unit/mesh-gateway-deployment.bats | 1 - 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/templates/client-snapshot-agent-deployment.yaml b/templates/client-snapshot-agent-deployment.yaml index ec1cf5211..c7544b013 100644 --- a/templates/client-snapshot-agent-deployment.yaml +++ b/templates/client-snapshot-agent-deployment.yaml @@ -126,8 +126,7 @@ spec: - | consul-k8s acl-init \ -secret-name="{{ template "consul.fullname" . }}-client-snapshot-agent-acl-token" \ - -k8s-namespace={{ .Release.Namespace }} \ - -init-type="sync" + -k8s-namespace={{ .Release.Namespace }} volumeMounts: - name: aclconfig mountPath: /consul/aclconfig diff --git a/templates/connect-inject-deployment.yaml b/templates/connect-inject-deployment.yaml index 29d958015..fecb8d071 100644 --- a/templates/connect-inject-deployment.yaml +++ b/templates/connect-inject-deployment.yaml @@ -190,8 +190,7 @@ spec: - | consul-k8s acl-init \ -secret-name="{{ template "consul.fullname" . }}-connect-inject-acl-token" \ - -k8s-namespace={{ .Release.Namespace }} \ - -init-type="sync" + -k8s-namespace={{ .Release.Namespace }} {{- end }} {{- if .Values.connectInject.nodeSelector }} nodeSelector: diff --git a/templates/enterprise-license-job.yaml b/templates/enterprise-license-job.yaml index ddc6eff67..71d9598f0 100644 --- a/templates/enterprise-license-job.yaml +++ b/templates/enterprise-license-job.yaml @@ -109,8 +109,7 @@ spec: - | consul-k8s acl-init \ -secret-name="{{ template "consul.fullname" . }}-enterprise-license-acl-token" \ - -k8s-namespace={{ .Release.Namespace }} \ - -init-type="sync" + -k8s-namespace={{ .Release.Namespace }} {{- end }} {{- end }} {{- end }} diff --git a/templates/mesh-gateway-deployment.yaml b/templates/mesh-gateway-deployment.yaml index a38ad6016..f1c3d7176 100644 --- a/templates/mesh-gateway-deployment.yaml +++ b/templates/mesh-gateway-deployment.yaml @@ -112,7 +112,6 @@ spec: consul-k8s acl-init \ -secret-name="{{ template "consul.fullname" . }}-mesh-gateway-acl-token" \ -k8s-namespace={{ .Release.Namespace }} \ - -init-type="sync" \ -token-sink-file=/consul/service/acl-token {{ end }} diff --git a/templates/sync-catalog-deployment.yaml b/templates/sync-catalog-deployment.yaml index 23cb7f1a1..468d1b359 100644 --- a/templates/sync-catalog-deployment.yaml +++ b/templates/sync-catalog-deployment.yaml @@ -175,8 +175,7 @@ spec: - | consul-k8s acl-init \ -secret-name="{{ template "consul.fullname" . }}-catalog-sync-acl-token" \ - -k8s-namespace={{ .Release.Namespace }} \ - -init-type="sync" + -k8s-namespace={{ .Release.Namespace }} {{- end }} {{- if .Values.syncCatalog.nodeSelector }} nodeSelector: diff --git a/test/unit/mesh-gateway-deployment.bats b/test/unit/mesh-gateway-deployment.bats index dcdd20061..453631bfe 100755 --- a/test/unit/mesh-gateway-deployment.bats +++ b/test/unit/mesh-gateway-deployment.bats @@ -632,7 +632,6 @@ consul services register \ exp='consul-k8s acl-init \ -secret-name="release-name-consul-mesh-gateway-acl-token" \ -k8s-namespace=default \ - -init-type="sync" \ -token-sink-file=/consul/service/acl-token consul-k8s service-address \