Add test pods labels.

- Uses helm toolkit to add labels to test pods.

Change-Id: I60009c3c502c76d77f9edbf64d93118079f94253
This commit is contained in:
Aaron Sheffield 2018-07-10 15:56:59 -05:00
parent 06d6747b50
commit 69a6f80031
2 changed files with 10 additions and 2 deletions

View File

@ -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:

View File

@ -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: