diff options
author | Instrumental <jonathan.gathman@att.com> | 2018-10-03 08:38:52 -0500 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2018-10-03 08:39:02 -0500 |
commit | 08e93406376e318c8e935716403d2366c8402bb8 (patch) | |
tree | 27e405ebba6becee53c6842e238a45a871a9448f /auth/helm | |
parent | aebee0032fe3d636f5c077df7bb5ee705bb38c44 (diff) |
Create Helm Instantiation
Issue-ID: AAF-517
Change-Id: I67c8408baa62a779fe5f7fa945dab2f8f9919f39
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/helm')
-rw-r--r-- | auth/helm/aaf/.helmignore | 21 | ||||
-rw-r--r-- | auth/helm/aaf/Chart.yaml | 5 | ||||
-rw-r--r-- | auth/helm/aaf/templates/NOTES.txt | 1 | ||||
-rw-r--r-- | auth/helm/aaf/templates/aaf-pod.yaml | 296 | ||||
-rw-r--r-- | auth/helm/aaf/templates/cass_pv.yaml | 24 | ||||
-rw-r--r-- | auth/helm/aaf/templates/cass_pvc.yaml | 29 | ||||
-rw-r--r-- | auth/helm/aaf/templates/config_pv.yaml | 24 | ||||
-rw-r--r-- | auth/helm/aaf/templates/config_pvc.yaml | 29 | ||||
-rw-r--r-- | auth/helm/aaf/templates/logs_pv.yaml | 25 | ||||
-rw-r--r-- | auth/helm/aaf/templates/logs_pvc.yaml | 29 | ||||
-rw-r--r-- | auth/helm/aaf/values.yaml | 68 |
11 files changed, 551 insertions, 0 deletions
diff --git a/auth/helm/aaf/.helmignore b/auth/helm/aaf/.helmignore new file mode 100644 index 00000000..f0c13194 --- /dev/null +++ b/auth/helm/aaf/.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/Chart.yaml b/auth/helm/aaf/Chart.yaml new file mode 100644 index 00000000..62942d91 --- /dev/null +++ b/auth/helm/aaf/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: AAF Helm Chart +name: aaf +version: 2.1.2-SNAPSHOT diff --git a/auth/helm/aaf/templates/NOTES.txt b/auth/helm/aaf/templates/NOTES.txt new file mode 100644 index 00000000..a6805571 --- /dev/null +++ b/auth/helm/aaf/templates/NOTES.txt @@ -0,0 +1 @@ +AAF Persistence basics loaded diff --git a/auth/helm/aaf/templates/aaf-pod.yaml b/auth/helm/aaf/templates/aaf-pod.yaml new file mode 100644 index 00000000..031a45b3 --- /dev/null +++ b/auth/helm/aaf/templates/aaf-pod.yaml @@ -0,0 +1,296 @@ +kind: Pod +apiVersion: v1 +metadata: + name: {{ .Values.cadi.hostname }} + namespace: {{ .Values.global.common.namespace }} +spec: + volumes: + - name: {{ .Chart.Name }}-config-vol + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-config-pvc + - name: {{ .Chart.Name }}-logs-vol + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-logs-pvc + - name: {{ .Chart.Name }}-cass-vol + persistentVolumeClaim: + claimName: {{ .Chart.Name }}-cass-pvc + # Use this Pod Sharing dir to declare various States of starting + - name: {{ .Chart.Name }}-pod-status + emptyDir: {} + hostAliases: + - ip: "127.0.0.1" + hostnames: + - "cass.{{ .Values.cadi.hostname }}" + - "service.{{ .Values.cadi.hostname }}" + - "locate.{{ .Values.cadi.hostname }}" + - "oauth.{{ .Values.cadi.hostname }}" + - "gui.{{ .Values.cadi.hostname }}" + - "cm.{{ .Values.cadi.hostname }}" + - "hello.{{ .Values.cadi.hostname }}" + - "fs.{{ .Values.cadi.hostname }}" +### +### DEFINE THE CONTAINERS +### + +### +### INIT Containers +### + containers: + initContainers: + - name: {{ .Chart.Name }}-config-container + image: {{ .Values.image.repository }}onap/aaf/aaf_config:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" +### +### Regular Containers +### + containers: +### +### AAF-CASS +### + - name: {{ .Chart.Name }}-cass + image: {{ .Values.image.repository }}onap/aaf/aaf_cass:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well + command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"] + volumeMounts: + - mountPath: "/data" + name: {{ .Chart.Name }}-cass-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-pod-status + ports: + - name: storage + containerPort: 7000 + - name: ssl-storage + containerPort: 7001 + - name: native-trans + containerPort: 9042 + - name: rpc + containerPort: 9160 + env: + - name: CASSANDRA_CLUSTER_NAME + value: "osaaf" + - name: CASSANDRA_DC + value: "dc1" + - name: HEAP_NEWSIZE + value: "512M" + - name: MAX_HEAP_SIZE + value: "1024M" +### +### AAF-Service +### + - name: {{ .Chart.Name }}-service + image: {{ .Values.image.repository }}onap/aaf/aaf_service:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_service","aaf_cass","/opt/app/aaf/bin/service"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-pod-status + ports: + - name: service + protocol: TCP + containerPort: 8100 + hostPort: 8100 + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" +### +### AAF-Locate +### + - name: {{ .Chart.Name }}-locate + image: {{ .Values.image.repository }}onap/aaf/aaf_locate:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_locate","aaf_service","/opt/app/aaf/bin/locate"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-pod-status + ports: + - name: locate + protocol: TCP + containerPort: 8095 + hostPort: 443 + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" +### +### AAF-OAuth +### + - name: {{ .Chart.Name }}-oauth + image: {{ .Values.image.repository }}onap/aaf/aaf_oauth:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_oauth","aaf_service","/opt/app/aaf/bin/oauth"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-pod-status + ports: + - name: oauth + protocol: TCP + containerPort: 8140 + hostPort: 8140 + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" +### +### AAF-Gui +### + - name: {{ .Chart.Name }}-gui + image: {{ .Values.image.repository }}onap/aaf/aaf_gui:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_gui","aaf_locate","/opt/app/aaf/bin/gui"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-pod-status + ports: + - name: gui + protocol: TCP + containerPort: 8200 + hostPort: 8200 + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" +### +### AAF-Certman +### + - name: {{ .Chart.Name }}-cm + image: {{ .Values.image.repository }}onap/aaf/aaf_cm:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_cm","aaf_locate","/opt/app/aaf/bin/cm"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-pod-status + ports: + - name: cm + protocol: TCP + containerPort: 8150 + hostPort: 8150 + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" +### +### AAF-FS +### + - name: {{ .Chart.Name }}-fs + image: {{ .Values.image.repository }}onap/aaf/aaf_fs:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + ports: + - name: fs + protocol: TCP + containerPort: 8096 + hostPort: 80 + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" +### +### AAF-Hello +### + - name: {{ .Chart.Name }}-hello + image: {{ .Values.image.repository }}onap/aaf/aaf_hello:{{ .Values.image.version }} + imagePullPolicy: IfNotPresent + command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_hello","aaf_locate","/opt/app/aaf/bin/hello"] + volumeMounts: + - mountPath: "/opt/app/osaaf" + name: {{ .Chart.Name }}-config-vol + - mountPath: "/opt/app/aaf/status" + name: {{ .Chart.Name }}-pod-status + ports: + - name: hello + protocol: TCP + containerPort: 8130 + hostPort: 8130 + env: + - name: HOSTNAME + value: "{{ .Values.cadi.hostname }}" + - name: AAF_ENV + value: "{{ .Values.cadi.aaf_env }}" + - name: AAF_REGISTER_AS + value: "{{ .Values.cadi.aaf_register_as }}" + - name: LATITUDE + value: "{{ .Values.cadi.cadi_latitude }}" + - name: LONGITUDE + value: "{{ .Values.cadi.cadi_longitude }}" + - name: CASS_HOST + value: "cass.{{ .Values.cadi.hostname }}:127.0.0.1" diff --git a/auth/helm/aaf/templates/cass_pv.yaml b/auth/helm/aaf/templates/cass_pv.yaml new file mode 100644 index 00000000..c4b075b5 --- /dev/null +++ b/auth/helm/aaf/templates/cass_pv.yaml @@ -0,0 +1,24 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +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 new file mode 100644 index 00000000..53a04cf8 --- /dev/null +++ b/auth/helm/aaf/templates/cass_pvc.yaml @@ -0,0 +1,29 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +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 new file mode 100644 index 00000000..b43655a6 --- /dev/null +++ b/auth/helm/aaf/templates/config_pv.yaml @@ -0,0 +1,24 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +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 new file mode 100644 index 00000000..ecc0b0f5 --- /dev/null +++ b/auth/helm/aaf/templates/config_pvc.yaml @@ -0,0 +1,29 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +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/logs_pv.yaml b/auth/helm/aaf/templates/logs_pv.yaml new file mode 100644 index 00000000..608d0f99 --- /dev/null +++ b/auth/helm/aaf/templates/logs_pv.yaml @@ -0,0 +1,25 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-logs-pv + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-logs + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" +spec: + capacity: + storage: {{ .Values.persistence.logs.size}} + accessModes: + - {{ .Values.persistence.logs.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.logs.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.persistence.mountPath }}/{{ .Values.persistence.logs.mountSubPath }} +{{- if .Values.persistence.logs.storageClass }} +{{- if (eq "-" .Values.persistence.logs.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.logs.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/templates/logs_pvc.yaml b/auth/helm/aaf/templates/logs_pvc.yaml new file mode 100644 index 00000000..bd704cdc --- /dev/null +++ b/auth/helm/aaf/templates/logs_pvc.yaml @@ -0,0 +1,29 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Chart.Name }}-logs-pvc + namespace: {{ .Values.global.common.namespace }} + labels: + app: {{ .Chart.Name }}-logs +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ .Chart.Name }}-logs + accessModes: + - {{ .Values.persistence.logs.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.logs.size }} +{{- if .Values.persistence.logs.storageClass }} +{{- if (eq "-" .Values.persistence.logs.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.logs.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/auth/helm/aaf/values.yaml b/auth/helm/aaf/values.yaml new file mode 100644 index 00000000..f3f1b1b6 --- /dev/null +++ b/auth/helm/aaf/values.yaml @@ -0,0 +1,68 @@ +# Default values for aaf. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +global: + persistence: + enabled: true + common: + namespace: onap + +ingress: + enabled: false + +cadi: + hostname: "aaf.osaaf.org" + cadi_latitude: "38.0" + cadi_longitude: "-72.0" + aaf_env: "DEV" + aaf_register_as: "aaf.osaaf.org" + +persistence: + mountPath: "/mnt/data/aaf" + config: + volumeReclaimPolicy: Retain + accessMode: ReadWriteOnce + size: 2Gi + mountSubPath: "config" + storageClass: "manual" + logs: + volumeReclaimPolicy: Retain + accessMode: ReadWriteOnce + size: 2Gi + mountSubPath: "logs" + storageClass: "manual" + cass: + volumeReclaimPolicy: Retain + accessMode: ReadWriteOnce + size: 10Gi + mountSubPath: "cass" + 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.2-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: {} |