diff --git a/wcmp-app/.helmignore b/wcmp-app/.helmignore new file mode 100644 index 00000000..870b444f --- /dev/null +++ b/wcmp-app/.helmignore @@ -0,0 +1,27 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/wcmp-app/Chart.yaml b/wcmp-app/Chart.yaml new file mode 100644 index 00000000..32866f6e --- /dev/null +++ b/wcmp-app/Chart.yaml @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v2 +name: wcmp-app +description: wcmp-app Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "v0.0.2" + diff --git a/wcmp-app/files/certs/tls.cacrt b/wcmp-app/files/certs/tls.cacrt new file mode 100644 index 00000000..d4440bdf --- /dev/null +++ b/wcmp-app/files/certs/tls.cacrt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDYDCCAkgCCQDe99fSN9qxSTANBgkqhkiG9w0BAQsFADByMQswCQYDVQQGEwJV +UzELMAkGA1UECAwCQ0ExEjAQBgNVBAcMCU1lbmxvUGFyazEMMAoGA1UECgwDT05G +MRQwEgYDVQQLDAtFbmdpbmVlcmluZzEeMBwGA1UEAwwVY2Eub3Blbm5ldHdvcmtp +bmcub3JnMB4XDTE5MDQxMTA5MDYxM1oXDTI5MDQwODA5MDYxM1owcjELMAkGA1UE +BhMCVVMxCzAJBgNVBAgMAkNBMRIwEAYDVQQHDAlNZW5sb1BhcmsxDDAKBgNVBAoM +A09ORjEUMBIGA1UECwwLRW5naW5lZXJpbmcxHjAcBgNVBAMMFWNhLm9wZW5uZXR3 +b3JraW5nLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMEg7CZR +X8Y+syKHaQCh6mNIL1D065trwX8RnuKM2kBwSu034zefQAPloWugSoJgJnf5fe0j +nUD8gN3Sm8XRhCkvf67pzfabgw4n8eJmHScyL/ugyExB6Kahwzn37bt3oT3gSqhr +6PUznWJ8fvfVuCHZZkv/HPRp4eyAcGzbJ4TuB0go4s6VE0WU5OCxCSlAiK3lvpVr +3DOLdYLVoCa5q8Ctl3wXDrfTLw5/Bpfrg9fF9ED2/YKIdV8KZ2ki/gwEOQqWcKp8 +0LkTlfOWsdGjp4opPuPT7njMBGXMJzJ8/J1e1aJvIsoB7n8XrfvkNiWL5U3fM4N7 +UZN9jfcl7ULmm7cCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAIh6FjkQuTfXddmZY +FYpoTen/VD5iu2Xxc1TexwmKeH+YtaKp1Zk8PTgbCtMEwEiyslfeHTMtODfnpUIk +DwvtB4W0PAnreRsqh9MBzdU6YZmzGyZ92vSUB3yukkHaYzyjeKM0AwgVl9yRNEZw +Y/OM070hJXXzJh3eJpLl9dlUbMKzaoAh2bZx6y3ZJIZFs/zrpGfg4lvBAvfO/59i +mxJ9bQBSN3U2Hwp6ioOQzP0LpllfXtx9N5LanWpB0cu/HN9vAgtp3kRTBZD0M1XI +Ctit8bXV7Mz+1iGqoyUhfCYcCSjuWTgAxzir+hrdn7uO67Hv4ndCoSj4SQaGka3W +eEfVeA== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/wcmp-app/files/certs/tls.crt b/wcmp-app/files/certs/tls.crt new file mode 100644 index 00000000..82f38922 --- /dev/null +++ b/wcmp-app/files/certs/tls.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDdDCCAlwCFBveh0tyYQtXayQPaXgW+5dLuK8DMA0GCSqGSIb3DQEBCwUAMHIx +CzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDQTESMBAGA1UEBwwJTWVubG9QYXJrMQww +CgYDVQQKDANPTkYxFDASBgNVBAsMC0VuZ2luZWVyaW5nMR4wHAYDVQQDDBVjYS5v +cGVubmV0d29ya2luZy5vcmcwHhcNMTkwNzE2MTkwNjU2WhcNMjkwNzEzMTkwNjU2 +WjB7MQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExEjAQBgNVBAcMCU1lbmxvUGFy +azEMMAoGA1UECgwDT05GMRQwEgYDVQQLDAtFbmdpbmVlcmluZzEnMCUGA1UEAwwe +b25vcy1jb25maWcub3Blbm5ldHdvcmtpbmcub3JnMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAs1ER/FG9COwYnyDOxxPIGJb8p9l59GLqYdnb3PH5EI6y +AfhpJDhp+Z/RN8v+/NhH6JPYquPxRKWmHhRXmwEHgYREfkqK+HikTv86H5Tq/Xzz +BqadHkopMz+Q66Wo4LoD3M+Vl/11gUU9s7SIWBmcJly9ETQN5nddeGa+v+Mg9QoS +W/8CK7Y1iCguu3h2FYju+OQ7HJ9hO5abs3XiuJJJN9hPJRr1O1UtgUzlVbj2QLcT +BDntIxPKUc3/M5IpzgLt2vgHW9VMO5vFOXsr+UyQd/lByVXTxQKS5aw0kwMUJSdN +vasV3FAz4usP9IBx5Pq3MwMQF1uO5zJ8Xo2ytlsI0wIDAQABMA0GCSqGSIb3DQEB +CwUAA4IBAQB9W8/ygG87QLR37GZfutYLi9hBJQHSppCxZB2SBP1yl/Js1hHM0paP +ywlbRbmuCv7LM3CiaXdJo9w7onYha/BtJIYG0YHZqnXLjk0uufP07CBISGKXnfp0 +y35YqruHjXtkoKdcqOGZsuz88iQ579PrvJpWCOon936FM7vBzKeBoNbBso52vt7b +FtKISoGAr8XwCrFYxgHOjYUP8A9d9ylaa3Hgfd7Xul2BKO3tPx/7oFxiaz40ATuQ +wN9OEsvNmP2TcrLEFKoUJBtyYV9gFCqQPuf7obwbTV5m1JW+1+NEsKNcWemdKU6x +N0u+jCC7D7so8pjqfZRouCW2dKVlIRjj +-----END CERTIFICATE----- diff --git a/wcmp-app/files/certs/tls.key b/wcmp-app/files/certs/tls.key new file mode 100644 index 00000000..55af346c --- /dev/null +++ b/wcmp-app/files/certs/tls.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCzURH8Ub0I7Bif +IM7HE8gYlvyn2Xn0Yuph2dvc8fkQjrIB+GkkOGn5n9E3y/782Efok9iq4/FEpaYe +FFebAQeBhER+Sor4eKRO/zoflOr9fPMGpp0eSikzP5DrpajgugPcz5WX/XWBRT2z +tIhYGZwmXL0RNA3md114Zr6/4yD1ChJb/wIrtjWIKC67eHYViO745Dscn2E7lpuz +deK4kkk32E8lGvU7VS2BTOVVuPZAtxMEOe0jE8pRzf8zkinOAu3a+Adb1Uw7m8U5 +eyv5TJB3+UHJVdPFApLlrDSTAxQlJ029qxXcUDPi6w/0gHHk+rczAxAXW47nMnxe +jbK2WwjTAgMBAAECggEBALE57iHIk6Hu3wLfhR9DUN/k0r/+dMdywB6IGQKNcVHJ +BuxlnV08GJmsODcCevlhteiLv3hfI4Vqhv1xs4gygz2iAaQkfqfHbPXa0ZKHN53j +0bqAEAfw2jmZmN0edQPvNYQW8s4upuVmDu6+/oa8gRV1UTRgk2B2Fz65pcu3a0pi +yVeZzeAO/vD7WNP3uM7Yuv0AQTKKLvOqZmKLeDwPeC+2sbi03opYbIaEl+OJ94DX +9hCm1/vqojlzw+BHrxGS8bqXMnJnqxLep/gmbvL0Iy92SJgEBk6l8t7xzpBqSjDW ++DjDLqpda6r/Dy9b5hBZ0a/4V+fRJPz4S/k+qjp9DyECgYEA7KMQur7QZcSAWPPM +ZV5TM6+SDYn6TP9csbyB4IbOfeLdIkVKY+svVz2m7FynfQb4whtxERbMy0QjYEgc +us3p/QVjHBs/JZIdtIg5ff6qgOFAkuaCXEJKyH4wcEA091cr6HWslWCHzop2SD+T +dpvSgXJXpx1RYP/6X3sUf1mKAOMCgYEAwf1K4fOYZwyT44VPurxhmzgDWW2PKm6I +gCOZN9EN2Mvt0J5zKKoHw8ORHGN9zxLMyB11803Uwm7nceApM3FUacmLHP05Q1Vo +ukHVLoFQYwXLQzSWiZbtxcbMK3P1EU2Sg5+yfoRf6usmRIWDlr4+TIzT3a20nhV0 +olOj3xFtC1ECgYBHyeiHXuAGH6j4U24MyqLfKUJbzSIcPdQ3L4MPRJZcZnjDrtW0 +nmLMSq3bQvik23qYGI8iqhITEGbTDM16doGn+vxoSHPNyBgu7qzSZnH/i1Z1umyN +5KafUHkNdM0cxFtTuG9VGeXZaPQdUvw/nWItVyz0S9amYMHqOYKsZ9OQFQKBgQC6 +tfYq//CBzqNQ63DPxJ0VbpYars6LApQy8RB5nqb7MVyV3MvuKakLjOHQNxpSAkBD +o8dxBEpxUZlGC4DcWInsv+U7Y6aH3l7MVqy+9AvRIzR+XNE/YJs+Lpc4g4UuwEDy +mvSLvREs5GOStAbxQe5oc2tAA/7B4Ni/nE0vWHBh4QKBgDUukLjK4i+AqCm6Z4iu +/FcKtNC2+BLxZ2sjaRVn78aQ2DXWaKWVaKwSBJOtLghOyjAzvH8VDOtvp92rQgDk +ltnoTp09B9B80dNOVqIi113Inr89N/QDNVYctqPbzizbWHlf3ENwVklwAXhmOIbN +1l0Cge8ERKGcAIl9SsTl+5Se +-----END PRIVATE KEY----- diff --git a/wcmp-app/templates/_helpers.tpl b/wcmp-app/templates/_helpers.tpl new file mode 100644 index 00000000..d7e70941 --- /dev/null +++ b/wcmp-app/templates/_helpers.tpl @@ -0,0 +1,116 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +{{/* +Expand the name of the chart. +*/}} +{{- define "wcmp-app.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "wcmp-app.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "wcmp-app.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "wcmp-app.labels" -}} +helm.sh/chart: {{ include "wcmp-app.chart" . }} +{{ include "wcmp-app.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "wcmp-app.selectorLabels" -}} +app.kubernetes.io/name: {{ include "wcmp-app.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "wcmp-app.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "wcmp-app.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +wcmp-app image name +*/}} +{{- define "wcmp-app.imagename" -}} +{{- if .Values.global.image.registry -}} +{{- printf "%s/" .Values.global.image.registry -}} +{{- else if .Values.image.registry -}} +{{- printf "%s/" .Values.image.registry -}} +{{- end -}} +{{- printf "%s:" .Values.image.repository -}} +{{- if .Values.global.image.tag -}} +{{- .Values.global.image.tag -}} +{{- else -}} +{{- tpl .Values.image.tag . -}} +{{- end -}} +{{- end -}} + + +{{/* +wcmp-app consensus image name +*/}} +{{- define "wcmp-app.store.consensus.imagename" -}} +{{- if or .Values.store.consensus.image.tag .Values.global.store.consensus.image.tag -}} +{{- if .Values.global.store.consensus.image.registry -}} +{{- printf "%s/" .Values.global.store.consensus.image.registry -}} +{{- else if .Values.store.consensus.image.registry -}} +{{- printf "%s/" .Values.store.consensus.image.registry -}} +{{- end -}} +{{- printf "%s:" .Values.store.consensus.image.repository -}} +{{- if .Values.global.store.consensus.image.tag -}} +{{- .Values.global.store.consensus.image.tag -}} +{{- else -}} +{{- .Values.store.consensus.image.tag -}} +{{- end -}} +{{- else -}} +"" +{{- end -}} +{{- end -}} + +{{/* +wcmp-app consensus store name +*/}} +{{- define "wcmp-app.store.consensus.name" -}} +{{- if .Values.store.consensus.name -}} +{{- printf "%s" .Values.store.consensus.name -}} +{{- else -}} +{{- printf "%s-consensus-store" ( include "wcmp-app.fullname" . ) -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/wcmp-app/templates/configmap.yaml b/wcmp-app/templates/configmap.yaml new file mode 100644 index 00000000..a9a888c2 --- /dev/null +++ b/wcmp-app/templates/configmap.yaml @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "wcmp-app.fullname" . }}-config + labels: + app: {{ template "wcmp-app.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +data: + logging.yaml: |- +{{- if .Values.logging }} +{{ toYaml .Values.logging | indent 4 }} +{{- end}} \ No newline at end of file diff --git a/wcmp-app/templates/deployment.yaml b/wcmp-app/templates/deployment.yaml new file mode 100644 index 00000000..e99dfb75 --- /dev/null +++ b/wcmp-app/templates/deployment.yaml @@ -0,0 +1,136 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "wcmp-app.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "wcmp-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + name: {{ template "wcmp-app.fullname" . }} + app: onos + type: wcmp + resource: {{ template "wcmp-app.fullname" . }} + {{- include "wcmp-app.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + name: {{ template "wcmp-app.fullname" . }} + app: onos + type: wcmp + resource: {{ template "wcmp-app.fullname" . }} + {{- include "wcmp-app.selectorLabels" . | nindent 8 }} + annotations: + broker.atomix.io/inject: "true" + raft.storage.atomix.io/inject: "true" + {{- range $key, $value := .Values.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + spec: + serviceAccountName: {{ template "wcmp-app.fullname" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: {{ include "wcmp-app.imagename" . | quote }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + # *_NAMESPACE and *_NAME environment variables are recognized by onos-lib-go utilities. + # These variables should always be defined. + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: POD_ID + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: SERVICE_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + + - name: SERVICE_NAME + value: {{ template "wcmp-app.fullname" . }} + - name: NODE_ID + valueFrom: + fieldRef: + fieldPath: spec.nodeName + + args: + - "--caPath=/etc/onos/certs/tls.cacrt" + - "--keyPath=/etc/onos/certs/tls.key" + - "--certPath=/etc/onos/certs/tls.crt" + {{- if .Values.topoEndpoint }} + - {{ printf "--topoEndpoint=%s" .Values.topoEndpoint }} + {{- end }} + ports: + - name: grpc + containerPort: 5150 + startupProbe: + tcpSocket: + port: 5150 + periodSeconds: 5 + failureThreshold: 60 + readinessProbe: + tcpSocket: + port: 5150 + initialDelaySeconds: 10 + periodSeconds: 10 + livenessProbe: + tcpSocket: + port: 5150 + initialDelaySeconds: 10 + periodSeconds: 10 + volumeMounts: + - name: config + mountPath: /etc/onos/wcmp + readOnly: true + - name: secret + mountPath: /etc/onos/certs + readOnly: true + # Enable ptrace for debugging + securityContext: + {{- if .Values.debug }} + capabilities: + add: + - SYS_PTRACE + {{- end }} + # Mount volumes + volumes: + - name: config + configMap: + name: {{ template "wcmp-app.fullname" . }}-config + - name: secret + secret: + secretName: {{ template "wcmp-app.fullname" . }}-secret + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/wcmp-app/templates/secret.yaml b/wcmp-app/templates/secret.yaml new file mode 100644 index 00000000..e061f722 --- /dev/null +++ b/wcmp-app/templates/secret.yaml @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "wcmp-app.fullname" . }}-secret + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +data: + {{ $root := . }} + {{ range $path, $bytes := .Files.Glob "files/certs/tls.*" }} + {{ base $path }}: '{{ $root.Files.Get $path | b64enc }}' + {{ end }} +type: Opaque \ No newline at end of file diff --git a/wcmp-app/templates/service.yaml b/wcmp-app/templates/service.yaml new file mode 100644 index 00000000..f045b7ac --- /dev/null +++ b/wcmp-app/templates/service.yaml @@ -0,0 +1,25 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: {{ template "wcmp-app.fullname" . }} + labels: + app: {{ template "wcmp-app.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + {{- include "wcmp-app.labels" . | nindent 4 }} +spec: + type: ClusterIP + selector: + name: {{ template "wcmp-app.fullname" . }} + app: onos + type: wcmp + resource: {{ template "wcmp-app.fullname" . }} + {{- include "wcmp-app.selectorLabels" . | nindent 4 }} + ports: + - name: grpc + port: 5150 \ No newline at end of file diff --git a/wcmp-app/templates/serviceaccount.yaml b/wcmp-app/templates/serviceaccount.yaml new file mode 100644 index 00000000..9de244dc --- /dev/null +++ b/wcmp-app/templates/serviceaccount.yaml @@ -0,0 +1,9 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "wcmp-app.fullname" . }} + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/wcmp-app/templates/store.yaml b/wcmp-app/templates/store.yaml new file mode 100644 index 00000000..cedf050a --- /dev/null +++ b/wcmp-app/templates/store.yaml @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +{{- if .Values.store.consensus.enabled }} +apiVersion: atomix.io/v2beta1 +kind: Store +metadata: + name: {{ template "wcmp-app.store.consensus.name" . }} + namespace: {{ .Release.Namespace }} +spec: + protocol: + apiVersion: storage.atomix.io/v2beta2 + kind: MultiRaftProtocol + spec: + replicas: {{ .Values.store.consensus.replicas }} + groups: {{ .Values.store.consensus.partitions }} + {{- with .Values.store.consensus.raft }} + raft: + {{- toYaml . | nindent 8 }} + {{- end }} + image: {{ template "wcmp-app.store.consensus.imagename" . }} + imagePullPolicy: {{ .Values.store.consensus.image.pullPolicy }} + {{- with .Values.store.consensus.image.pullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.store.consensus.securityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.store.consensus.persistence.storageClass }} + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + storageClassName: {{ .Values.store.consensus.persistence.storageClass | quote }} + resources: + requests: + storage: {{ .Values.store.consensus.persistence.storageSize }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/wcmp-app/values.yaml b/wcmp-app/values.yaml new file mode 100644 index 00000000..c7ffc747 --- /dev/null +++ b/wcmp-app/values.yaml @@ -0,0 +1,116 @@ +# SPDX-FileCopyrightText: 2022-present Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + + +# Default values for wcmp-app. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +global: + image: + registry: "" + tag: "" + store: + consensus: + name: "" + image: + registry: "" + tag: "" + +store: + consensus: + enabled: false + name: "" + image: + registry: "" + repository: atomix/atomix-raft-storage-node + tag: "" + pullPolicy: IfNotPresent + pullSecrets: [] + replicas: 1 + partitions: 1 + raft: {} + persistence: + storageClass: "" + storageSize: 1Gi + +replicaCount: 1 + +image: + registry: "" + repository: onosproject/wcmp-app + tag: '{{ .Chart.AppVersion }}' + pullPolicy: IfNotPresent + pullSecrets: [] + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "wcmp-app" + +debug: false + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +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 + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +logging: + loggers: + root: + level: info + output: + stdout: + sink: stdout + onos/grpc/retry: + level: error + atomix/grpc/retry: + level: error + sinks: + stdout: + type: stdout + stdout: {} + +