From 69a6f800312b0295fa9ff1f07480e480bace089f Mon Sep 17 00:00:00 2001 From: Aaron Sheffield Date: Tue, 10 Jul 2018 15:56:59 -0500 Subject: [PATCH] Add test pods labels. - Uses helm toolkit to add labels to test pods. Change-Id: I60009c3c502c76d77f9edbf64d93118079f94253 --- charts/drydock/templates/tests/test-drydock-api.yaml | 6 +++++- charts/drydock/templates/tests/test-drydock-auth.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/drydock/templates/tests/test-drydock-api.yaml b/charts/drydock/templates/tests/test-drydock-api.yaml index f55d52d3..e5fdfc26 100644 --- a/charts/drydock/templates/tests/test-drydock-api.yaml +++ b/charts/drydock/templates/tests/test-drydock-api.yaml @@ -11,10 +11,12 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. */}} +# limitations under the License. +*/}} {{/* Test that the API is up and the health endpoint returns a 2XX code */}} {{- if .Values.manifests.test_drydock_api }} +{{- $envAll := . }} --- apiVersion: v1 kind: Pod @@ -22,6 +24,8 @@ metadata: name: "{{ .Release.Name }}-api-test" annotations: "helm.sh/hook": "test-success" + labels: +{{ tuple $envAll "drydock" "api-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} spec: restartPolicy: Never containers: diff --git a/charts/drydock/templates/tests/test-drydock-auth.yaml b/charts/drydock/templates/tests/test-drydock-auth.yaml index bc5d0b2b..758f012e 100644 --- a/charts/drydock/templates/tests/test-drydock-auth.yaml +++ b/charts/drydock/templates/tests/test-drydock-auth.yaml @@ -11,11 +11,13 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. */}} +# limitations under the License. +*/}} {{/* Test to validate that the Drydock API pod rejects unauthenticated requests */}} {{- if .Values.manifests.test_drydock_auth }} +{{- $envAll := . }} --- apiVersion: v1 kind: Pod @@ -23,6 +25,8 @@ metadata: name: "{{ .Release.Name }}-auth-test" annotations: helm.sh/hook: "test-failure" + labels: +{{ tuple $envAll "drydock" "auth-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} spec: restartPolicy: Never containers: