53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
{{/*
|
|
# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# 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. */}}
|
|
{{/*
|
|
Test that the API is up and can be logged into */}}
|
|
{{- if .Values.manifests.test_maas_api }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: "{{ .Release.Name }}-api-test"
|
|
annotations:
|
|
"helm.sh/hook": "test-success"
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: "{{ .Release.Name }}-api-test"
|
|
env:
|
|
- name: 'MAAS_URL'
|
|
value: {{ tuple "maas_region_ui" "internal" "region_ui" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" | quote }}
|
|
- name: 'MAAS_API_KEY'
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: 'maas-api-key'
|
|
key: 'token'
|
|
image: {{ .Values.images.tags.maas_region }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
{{ tuple . .Values.pod.resources.test | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
|
|
command: ["/tmp/maas-test.sh"]
|
|
volumeMounts:
|
|
- name: maas-bin
|
|
mountPath: /tmp/maas-test.sh
|
|
subPath: maas-test.sh
|
|
readOnly: true
|
|
volumes:
|
|
- name: maas-bin
|
|
configMap:
|
|
name: maas-bin
|
|
defaultMode: 0555
|
|
...
|
|
{{- end }}
|