From bd7def7ee2098af56ce66752f59c062d7923fb69 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Wed, 3 Apr 2019 08:25:28 -0500 Subject: Create Helm based Certificates for Clients Issue-ID: AAF-802 Change-Id: I5fdc4daecd6bac7f042940473784cfb05c9e338e Signed-off-by: Instrumental --- auth/helm/.gitignore | 1 + auth/helm/aaf-hello/.helmignore | 21 +++++ auth/helm/aaf-hello/Chart.yaml | 25 ++++++ auth/helm/aaf-hello/aaf.sh | 84 ++++++++++++++++++++ auth/helm/aaf-hello/templates/NOTES.txt | 1 + auth/helm/aaf-hello/templates/aaf-hello.yaml | 102 ++++++++++++++++++++++++ auth/helm/aaf-hello/values.yaml | 77 ++++++++++++++++++ auth/helm/aaf/aaf.sh | 84 -------------------- auth/helm/aaf/templates/aaf-cass-pv.yaml | 44 +++++++++++ auth/helm/aaf/templates/aaf-cass-pvc.yaml | 49 ++++++++++++ auth/helm/aaf/templates/aaf-config-pv.yaml | 44 +++++++++++ auth/helm/aaf/templates/aaf-config-pvc.yaml | 49 ++++++++++++ auth/helm/aaf/templates/aaf-gui.yaml | 3 +- auth/helm/aaf/templates/aaf-hello.yaml | 114 --------------------------- auth/helm/aaf/templates/aaf-status-pv.yaml | 44 +++++++++++ auth/helm/aaf/templates/aaf-status-pvc.yaml | 49 ++++++++++++ auth/helm/aaf/templates/cass_pv.yaml | 44 ----------- auth/helm/aaf/templates/cass_pvc.yaml | 49 ------------ auth/helm/aaf/templates/config_pv.yaml | 44 ----------- auth/helm/aaf/templates/config_pvc.yaml | 49 ------------ auth/helm/aaf/templates/status_pv.yaml | 44 ----------- auth/helm/aaf/templates/status_pvc.yaml | 49 ------------ auth/helm/aaf/values.yaml | 19 +++-- 23 files changed, 604 insertions(+), 485 deletions(-) create mode 100644 auth/helm/aaf-hello/.helmignore create mode 100644 auth/helm/aaf-hello/Chart.yaml create mode 100644 auth/helm/aaf-hello/aaf.sh create mode 100644 auth/helm/aaf-hello/templates/NOTES.txt create mode 100644 auth/helm/aaf-hello/templates/aaf-hello.yaml create mode 100644 auth/helm/aaf-hello/values.yaml delete mode 100644 auth/helm/aaf/aaf.sh create mode 100644 auth/helm/aaf/templates/aaf-cass-pv.yaml create mode 100644 auth/helm/aaf/templates/aaf-cass-pvc.yaml create mode 100644 auth/helm/aaf/templates/aaf-config-pv.yaml create mode 100644 auth/helm/aaf/templates/aaf-config-pvc.yaml delete mode 100644 auth/helm/aaf/templates/aaf-hello.yaml create mode 100644 auth/helm/aaf/templates/aaf-status-pv.yaml create mode 100644 auth/helm/aaf/templates/aaf-status-pvc.yaml delete mode 100644 auth/helm/aaf/templates/cass_pv.yaml delete mode 100644 auth/helm/aaf/templates/cass_pvc.yaml delete mode 100644 auth/helm/aaf/templates/config_pv.yaml delete mode 100644 auth/helm/aaf/templates/config_pvc.yaml delete mode 100644 auth/helm/aaf/templates/status_pv.yaml delete mode 100644 auth/helm/aaf/templates/status_pvc.yaml (limited to 'auth/helm') diff --git a/auth/helm/.gitignore b/auth/helm/.gitignore index 1c5fad92..44cae669 100644 --- a/auth/helm/.gitignore +++ b/auth/helm/.gitignore @@ -1,3 +1,4 @@ aaf.orig/ pause/ aaf.new/ +aaf.props diff --git a/auth/helm/aaf-hello/.helmignore b/auth/helm/aaf-hello/.helmignore new file mode 100644 index 00000000..f0c13194 --- /dev/null +++ b/auth/helm/aaf-hello/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/auth/helm/aaf-hello/Chart.yaml b/auth/helm/aaf-hello/Chart.yaml new file mode 100644 index 00000000..3b23f6d0 --- /dev/null +++ b/auth/helm/aaf-hello/Chart.yaml @@ -0,0 +1,25 @@ +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## + +apiVersion: v1 +appVersion: "1.0" +description: AAF Hello Helm Chart +name: aaf-hello +version: 2.1.11-SNAPSHOT diff --git a/auth/helm/aaf-hello/aaf.sh b/auth/helm/aaf-hello/aaf.sh new file mode 100644 index 00000000..5bb83515 --- /dev/null +++ b/auth/helm/aaf-hello/aaf.sh @@ -0,0 +1,84 @@ +. ../../docker/d.props +IMAGE=onap/aaf/aaf_agent:$VERSION + +kubectl -n onap run -it --rm aaf-agent-$USER --image=$IMAGE --overrides=' +{ + "spec": { + "containers": [ + { + "name": "aaf-agent-'$USER'", + "image": "'$IMAGE'", + "imagePullPolicy": "IfNotPresent", + "command": [ + "bash", + "-c", + "/opt/app/aaf_config/bin/agent.sh && cd /opt/app/osaaf/local && exec bash" + ], + "env": [ + { + "name": "aaf_locator_container", + "value": "helm" + },{ + "name": "aaf_locator_fqdn", + "value": "'$HOSTNAME'" + },{ + "name": "aaf_locator_url", + "value": "https://aaf-locate:8095" + },{ + "name": "aaf_locator_public_hostname", + "value": "'$HOSTNAME'" + },{ + "name": "AAF_ENV", + "value": "'$AAF_ENV'" + },{ + "name": "LATITUDE", + "value": "'$LATITUDE'" + },{ + "name": "LONGITUDE", + "value": "'$LONGITUDE'" + },{ + "name": "CASSANDRA_CLUSTER", + "value": "'$CASSANDRA_CLUSTER'" + },{ + "name": "CASSANDRA_USER", + "value": "'$CASSANDRA_USER'" + },{ + "name": "CASSANDRA_PASSWORD", + "value": "'$CASSANDRA_PASSWORD'" + },{ + "name": "CASSANDRA_PORT", + "value": "'$CASSANDRA_PORT'" + } + ], + "stdin": true, + "stdinOnce": true, + "tty": true, + "volumeMounts": [ + { + "mountPath": "/opt/app/osaaf", + "name": "aaf-config-vol" + }, + { + "mountPath": "/opt/app/aaf/status", + "name": "aaf-status-vol" + } + ] + } + ], + "volumes": [ + { + "name": "aaf-config-vol", + "persistentVolumeClaim": { + "claimName": "aaf-config-pvc" + } + }, + { + "name": "aaf-status-vol", + "persistentVolumeClaim": { + "claimName": "aaf-status-pvc" + } + } + ] + } +} +' --restart=Never -- bash diff --git a/auth/helm/aaf-hello/templates/NOTES.txt b/auth/helm/aaf-hello/templates/NOTES.txt new file mode 100644 index 00000000..a6805571 --- /dev/null +++ b/auth/helm/aaf-hello/templates/NOTES.txt @@ -0,0 +1 @@ +AAF Persistence basics loaded diff --git a/auth/helm/aaf-hello/templates/aaf-hello.yaml b/auth/helm/aaf-hello/templates/aaf-hello.yaml new file mode 100644 index 00000000..c114e5eb --- /dev/null +++ b/auth/helm/aaf-hello/templates/aaf-hello.yaml @@ -0,0 +1,102 @@ +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## +### +### AAF-HELLO +### +kind: Service +apiVersion: v1 +metadata: + name: aaf-hello +spec: + selector: + app: aaf-hello + type: NodePort + ports: + - name: aaf-hello + protocol: TCP + port: 8130 + nodePort: 30086 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aaf-hello + labels: + app: aaf-hello +spec: + replicas: {{ .Values.replicas.hello }} + selector: + matchLabels: + app: aaf-hello + template: + metadata: + labels: + app: aaf-hello + spec: + volumes: + # Use this Pod Sharing dir to declare various States of starting + - name: hello-config-vol + emptyDir: {} + initContainers: + - name: hello-config-container + image: {{ .Values.image.repository }}onap/aaf/aaf_agent:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: "/opt/app/osaaf/local" + name: hello-config-vol + command: ["bash","-c","cd /opt/app/osaaf/local && /opt/app/aaf_config/bin/agent.sh place aaf@aaf.osaaf.org aaf"] + env: + - name: "AAF_ENV" + value: "DEV" + - name: "AAF_FQDN" + value: "aaf-locate.onap" + - name: "APP_FQDN" + value: "aaf" + - name: "APP_FQI" + value: "aaf@aaf.osaaf.org" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: "CONTAINER_NS" + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: "DEPLOY_FQI" + value: "deployer@people.osaaf.org" + - name: "DEPLOY_PASSWORD" + value: "demo123456!" + +### +### AAF-HELLO +### + containers: + - name: aaf-hello + image: {{ .Values.image.repository }}onap/aaf/aaf_hello:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","-c","cd /opt/app/aaf && exec bin/hello"] + volumeMounts: + - mountPath: "/opt/app/osaaf/local" + name: hello-config-vol + ports: + - name: aaf-hello + protocol: TCP + containerPort: 8130 + diff --git a/auth/helm/aaf-hello/values.yaml b/auth/helm/aaf-hello/values.yaml new file mode 100644 index 00000000..d5fa7476 --- /dev/null +++ b/auth/helm/aaf-hello/values.yaml @@ -0,0 +1,77 @@ +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## +# +# Default values for aaf. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +global: + persistence: + enabled: true + common: + namespace: "onap" + +replicas: + hello: 1 + +ingress: + enabled: false + +cadi: + hostname: "aaf.onap" + cadi_latitude: "38.0" + cadi_longitude: "-72.0" + aaf_env: "DEV" + +persistence: + # Note: Minikube will persist to /data on your host machine + mountPath: "/data/aaf" + hello: + volumeReclaimPolicy: Retain + accessMode: ReadWriteOnce + size: 1Gi + mountSubPath: "config" + storageClass: "manual" + +image: + # When using locally built Docker Container, set Repository to "" + repository: "" + # When using Docker Repo, add, and include trailing "/" + # repository: nexus3.onap.org:10003/ + # repository: localhost:5000/ + version: 2.1.11-SNAPSHOT + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/auth/helm/aaf/aaf.sh b/auth/helm/aaf/aaf.sh deleted file mode 100644 index 5bb83515..00000000 --- a/auth/helm/aaf/aaf.sh +++ /dev/null @@ -1,84 +0,0 @@ -. ../../docker/d.props -IMAGE=onap/aaf/aaf_agent:$VERSION - -kubectl -n onap run -it --rm aaf-agent-$USER --image=$IMAGE --overrides=' -{ - "spec": { - "containers": [ - { - "name": "aaf-agent-'$USER'", - "image": "'$IMAGE'", - "imagePullPolicy": "IfNotPresent", - "command": [ - "bash", - "-c", - "/opt/app/aaf_config/bin/agent.sh && cd /opt/app/osaaf/local && exec bash" - ], - "env": [ - { - "name": "aaf_locator_container", - "value": "helm" - },{ - "name": "aaf_locator_fqdn", - "value": "'$HOSTNAME'" - },{ - "name": "aaf_locator_url", - "value": "https://aaf-locate:8095" - },{ - "name": "aaf_locator_public_hostname", - "value": "'$HOSTNAME'" - },{ - "name": "AAF_ENV", - "value": "'$AAF_ENV'" - },{ - "name": "LATITUDE", - "value": "'$LATITUDE'" - },{ - "name": "LONGITUDE", - "value": "'$LONGITUDE'" - },{ - "name": "CASSANDRA_CLUSTER", - "value": "'$CASSANDRA_CLUSTER'" - },{ - "name": "CASSANDRA_USER", - "value": "'$CASSANDRA_USER'" - },{ - "name": "CASSANDRA_PASSWORD", - "value": "'$CASSANDRA_PASSWORD'" - },{ - "name": "CASSANDRA_PORT", - "value": "'$CASSANDRA_PORT'" - } - ], - "stdin": true, - "stdinOnce": true, - "tty": true, - "volumeMounts": [ - { - "mountPath": "/opt/app/osaaf", - "name": "aaf-config-vol" - }, - { - "mountPath": "/opt/app/aaf/status", - "name": "aaf-status-vol" - } - ] - } - ], - "volumes": [ - { - "name": "aaf-config-vol", - "persistentVolumeClaim": { - "claimName": "aaf-config-pvc" - } - }, - { - "name": "aaf-status-vol", - "persistentVolumeClaim": { - "claimName": "aaf-status-pvc" - } - } - ] - } -} -' --restart=Never -- bash diff --git a/auth/helm/aaf/templates/aaf-cass-pv.yaml b/auth/helm/aaf/templates/aaf-cass-pv.yaml new file mode 100644 index 00000000..48633a21 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-cass-pv.yaml @@ -0,0 +1,44 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## + +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-cass-pv + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-cass +spec: + capacity: + storage: {{ .Values.persistence.cass.size}} + accessModes: + - {{ .Values.persistence.cass.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.cass.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.cass.mountSubPath }} +{{- if .Values.persistence.cass.storageClass }} +{{- if (eq "-" .Values.persistence.cass.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.cass.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/templates/aaf-cass-pvc.yaml b/auth/helm/aaf/templates/aaf-cass-pvc.yaml new file mode 100644 index 00000000..9fcbe339 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-cass-pvc.yaml @@ -0,0 +1,49 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## + +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-cass-pvc + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-cass +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ .Chart.Name }}-cass + accessModes: + - {{ .Values.persistence.cass.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.cass.size }} +{{- if .Values.persistence.cass.storageClass }} +{{- if (eq "-" .Values.persistence.cass.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.cass.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/templates/aaf-config-pv.yaml b/auth/helm/aaf/templates/aaf-config-pv.yaml new file mode 100644 index 00000000..7066f520 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-config-pv.yaml @@ -0,0 +1,44 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## + +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-config-pv + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-config +spec: + capacity: + storage: {{ .Values.persistence.config.size}} + accessModes: + - {{ .Values.persistence.config.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.config.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.config.mountSubPath }} +{{- if .Values.persistence.config.storageClass }} +{{- if (eq "-" .Values.persistence.config.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.config.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/templates/aaf-config-pvc.yaml b/auth/helm/aaf/templates/aaf-config-pvc.yaml new file mode 100644 index 00000000..9136712b --- /dev/null +++ b/auth/helm/aaf/templates/aaf-config-pvc.yaml @@ -0,0 +1,49 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## + +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-config-pvc + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-config +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ .Chart.Name }}-config + accessModes: + - {{ .Values.persistence.config.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.config.size }} +{{- if .Values.persistence.config.storageClass }} +{{- if (eq "-" .Values.persistence.config.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.config.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/templates/aaf-gui.yaml b/auth/helm/aaf/templates/aaf-gui.yaml index 2a509b76..dcff5e7b 100644 --- a/auth/helm/aaf/templates/aaf-gui.yaml +++ b/auth/helm/aaf/templates/aaf-gui.yaml @@ -31,8 +31,9 @@ spec: ports: - name: aaf-gui protocol: TCP - port: 8200 nodePort: 30083 + port: 8200 + targetPort: 8200 --- apiVersion: apps/v1 kind: Deployment diff --git a/auth/helm/aaf/templates/aaf-hello.yaml b/auth/helm/aaf/templates/aaf-hello.yaml deleted file mode 100644 index 7c91c856..00000000 --- a/auth/helm/aaf/templates/aaf-hello.yaml +++ /dev/null @@ -1,114 +0,0 @@ -######### -## ============LICENSE_START==================================================== -## org.onap.aaf -## =========================================================================== -## 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. -## ============LICENSE_END==================================================== -## -### -### AAF-HELLO -### -kind: Service -apiVersion: v1 -metadata: - name: aaf-hello -spec: - selector: - app: aaf-hello - type: NodePort - ports: - - name: aaf-hello - protocol: TCP - port: 8130 - nodePort: 30086 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: aaf-hello - labels: - app: aaf-hello -spec: - replicas: {{ .Values.replicas.hello }} - selector: - matchLabels: - app: aaf-hello - template: - metadata: - labels: - app: aaf-hello - spec: - volumes: - # Use this Pod Sharing dir to declare various States of starting - - name: {{ .Chart.Name }}-config-vol - persistentVolumeClaim: - claimName: {{ .Chart.Name }}-config-pvc - - name: {{ .Chart.Name }}-status-vol - persistentVolumeClaim: - claimName: {{ .Chart.Name }}-status-pvc - initContainers: - - name: {{ .Chart.Name }}-config-container - image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - command: ["bash","/opt/app/aaf_config/bin/agent.sh"] - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - env: - - name: AAF_ENV - value: "{{ .Values.cadi.aaf_env }}" - - name: LATITUDE - value: "{{ .Values.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.cadi.cadi_longitude }}" - - name: aaf_locator_container - value: "helm" - - name: aaf_locator_container_ns - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: aaf_locate_url - value: "https://aaf-locate.onap:8095" - - name: aaf_locator_public_hostname - value: "aaf.osaaf.org" -# - name: CASSANDRA_USER -# value: "" -# - name: CASSANDRA_PASSWORD -# value: "" -# - name: CASSANDRA_PORT -# value: "" - containers: -### -### AAF-HELLO -### - - name: {{ .Chart.Name }}-hello - image: {{ .Values.image.repository }}onap/aaf/aaf_hello:{{ .Values.image.version }} - imagePullPolicy: IfNotPresent - command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-hello aaf-locate && exec bin/hello"] - volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ .Chart.Name }}-config-vol - - mountPath: "/opt/app/aaf/status" - name: {{ .Chart.Name }}-status-vol - ports: - - name: aaf-hello - protocol: TCP - containerPort: 8130 - env: - - name: aaf_locator_ns - valueFrom: - fieldRef: - fieldPath: metadata.namespace - diff --git a/auth/helm/aaf/templates/aaf-status-pv.yaml b/auth/helm/aaf/templates/aaf-status-pv.yaml new file mode 100644 index 00000000..418a368b --- /dev/null +++ b/auth/helm/aaf/templates/aaf-status-pv.yaml @@ -0,0 +1,44 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## + +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-status-pv + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-status +spec: + capacity: + storage: {{ .Values.persistence.status.size}} + accessModes: + - {{ .Values.persistence.status.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.status.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.status.mountSubPath }} +{{- if .Values.persistence.status.storageClass }} +{{- if (eq "-" .Values.persistence.status.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.status.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/templates/aaf-status-pvc.yaml b/auth/helm/aaf/templates/aaf-status-pvc.yaml new file mode 100644 index 00000000..2a402ff9 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-status-pvc.yaml @@ -0,0 +1,49 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## 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. +## ============LICENSE_END==================================================== +## + +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-status-pvc + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-status +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ .Chart.Name }}-status + accessModes: + - {{ .Values.persistence.status.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.status.size }} +{{- if .Values.persistence.status.storageClass }} +{{- if (eq "-" .Values.persistence.status.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.status.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/templates/cass_pv.yaml b/auth/helm/aaf/templates/cass_pv.yaml deleted file mode 100644 index 48633a21..00000000 --- a/auth/helm/aaf/templates/cass_pv.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -######### -## ============LICENSE_START==================================================== -## org.onap.aaf -## =========================================================================== -## 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. -## ============LICENSE_END==================================================== -## - -kind: PersistentVolume -apiVersion: v1 -metadata: - name: {{ .Chart.Name }}-cass-pv - namespace: {{ .Values.global.common.namespace }} - labels: - app: {{ .Chart.Name }}-cass -spec: - capacity: - storage: {{ .Values.persistence.cass.size}} - accessModes: - - {{ .Values.persistence.cass.accessMode }} - persistentVolumeReclaimPolicy: {{ .Values.persistence.cass.volumeReclaimPolicy }} - hostPath: - path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.cass.mountSubPath }} -{{- if .Values.persistence.cass.storageClass }} -{{- if (eq "-" .Values.persistence.cass.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.cass.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/auth/helm/aaf/templates/cass_pvc.yaml b/auth/helm/aaf/templates/cass_pvc.yaml deleted file mode 100644 index 9fcbe339..00000000 --- a/auth/helm/aaf/templates/cass_pvc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -######### -## ============LICENSE_START==================================================== -## org.onap.aaf -## =========================================================================== -## 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. -## ============LICENSE_END==================================================== -## - -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ .Chart.Name }}-cass-pvc - namespace: {{ .Values.global.common.namespace }} - labels: - app: {{ .Chart.Name }}-cass -{{- if .Values.persistence.annotations }} - annotations: -{{ toYaml .Values.persistence.annotations | indent 4 }} -{{- end }} -spec: - selector: - matchLabels: - app: {{ .Chart.Name }}-cass - accessModes: - - {{ .Values.persistence.cass.accessMode }} - resources: - requests: - storage: {{ .Values.persistence.cass.size }} -{{- if .Values.persistence.cass.storageClass }} -{{- if (eq "-" .Values.persistence.cass.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.cass.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/auth/helm/aaf/templates/config_pv.yaml b/auth/helm/aaf/templates/config_pv.yaml deleted file mode 100644 index 7066f520..00000000 --- a/auth/helm/aaf/templates/config_pv.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -######### -## ============LICENSE_START==================================================== -## org.onap.aaf -## =========================================================================== -## 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. -## ============LICENSE_END==================================================== -## - -kind: PersistentVolume -apiVersion: v1 -metadata: - name: {{ .Chart.Name }}-config-pv - namespace: {{ .Values.global.common.namespace }} - labels: - app: {{ .Chart.Name }}-config -spec: - capacity: - storage: {{ .Values.persistence.config.size}} - accessModes: - - {{ .Values.persistence.config.accessMode }} - persistentVolumeReclaimPolicy: {{ .Values.persistence.config.volumeReclaimPolicy }} - hostPath: - path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.config.mountSubPath }} -{{- if .Values.persistence.config.storageClass }} -{{- if (eq "-" .Values.persistence.config.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.config.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/auth/helm/aaf/templates/config_pvc.yaml b/auth/helm/aaf/templates/config_pvc.yaml deleted file mode 100644 index 9136712b..00000000 --- a/auth/helm/aaf/templates/config_pvc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -######### -## ============LICENSE_START==================================================== -## org.onap.aaf -## =========================================================================== -## 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. -## ============LICENSE_END==================================================== -## - -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ .Chart.Name }}-config-pvc - namespace: {{ .Values.global.common.namespace }} - labels: - app: {{ .Chart.Name }}-config -{{- if .Values.persistence.annotations }} - annotations: -{{ toYaml .Values.persistence.annotations | indent 4 }} -{{- end }} -spec: - selector: - matchLabels: - app: {{ .Chart.Name }}-config - accessModes: - - {{ .Values.persistence.config.accessMode }} - resources: - requests: - storage: {{ .Values.persistence.config.size }} -{{- if .Values.persistence.config.storageClass }} -{{- if (eq "-" .Values.persistence.config.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.config.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/auth/helm/aaf/templates/status_pv.yaml b/auth/helm/aaf/templates/status_pv.yaml deleted file mode 100644 index 418a368b..00000000 --- a/auth/helm/aaf/templates/status_pv.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -######### -## ============LICENSE_START==================================================== -## org.onap.aaf -## =========================================================================== -## 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. -## ============LICENSE_END==================================================== -## - -kind: PersistentVolume -apiVersion: v1 -metadata: - name: {{ .Chart.Name }}-status-pv - namespace: {{ .Values.global.common.namespace }} - labels: - app: {{ .Chart.Name }}-status -spec: - capacity: - storage: {{ .Values.persistence.status.size}} - accessModes: - - {{ .Values.persistence.status.accessMode }} - persistentVolumeReclaimPolicy: {{ .Values.persistence.status.volumeReclaimPolicy }} - hostPath: - path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.status.mountSubPath }} -{{- if .Values.persistence.status.storageClass }} -{{- if (eq "-" .Values.persistence.status.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.status.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/auth/helm/aaf/templates/status_pvc.yaml b/auth/helm/aaf/templates/status_pvc.yaml deleted file mode 100644 index 2a402ff9..00000000 --- a/auth/helm/aaf/templates/status_pvc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -######### -## ============LICENSE_START==================================================== -## org.onap.aaf -## =========================================================================== -## 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. -## ============LICENSE_END==================================================== -## - -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ .Chart.Name }}-status-pvc - namespace: {{ .Values.global.common.namespace }} - labels: - app: {{ .Chart.Name }}-status -{{- if .Values.persistence.annotations }} - annotations: -{{ toYaml .Values.persistence.annotations | indent 4 }} -{{- end }} -spec: - selector: - matchLabels: - app: {{ .Chart.Name }}-status - accessModes: - - {{ .Values.persistence.status.accessMode }} - resources: - requests: - storage: {{ .Values.persistence.status.size }} -{{- if .Values.persistence.status.storageClass }} -{{- if (eq "-" .Values.persistence.status.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.status.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/auth/helm/aaf/values.yaml b/auth/helm/aaf/values.yaml index 7556f251..abea8902 100644 --- a/auth/helm/aaf/values.yaml +++ b/auth/helm/aaf/values.yaml @@ -35,7 +35,6 @@ replicas: oauth: 1 cm: 1 gui: 1 - hello: 0 ingress: enabled: false @@ -49,11 +48,11 @@ cadi: persistence: # Note: Minikube will persist to /data on your host machine mountPath: "/data/aaf" - config: + cass: volumeReclaimPolicy: Retain accessMode: ReadWriteOnce - size: 2Gi - mountSubPath: "config" + size: 10Gi + mountSubPath: "cass" storageClass: "manual" status: volumeReclaimPolicy: Delete @@ -61,11 +60,17 @@ persistence: size: 10M mountSubPath: "status" storageClass: "manual" - cass: + config: volumeReclaimPolicy: Retain accessMode: ReadWriteOnce - size: 10Gi - mountSubPath: "cass" + size: 2Gi + mountSubPath: "config" + storageClass: "manual" + hello: + volumeReclaimPolicy: Retain + accessMode: ReadWriteOnce + size: 1Gi + mountSubPath: "config" storageClass: "manual" image: -- cgit 1.2.3-korg