From 09bc80d257c791506381b60a7c3995b15c7f1100 Mon Sep 17 00:00:00 2001 From: jasmineWen Date: Wed, 21 Mar 2018 18:21:17 +0000 Subject: Consul Helm Chart Standardization Issue-ID: OOM-730 Change-Id: I742979aa27022e553b33062762a1ad5f80940726 Signed-off-by: jasmineWen --- kubernetes/consul/Chart.yaml | 4 +- kubernetes/consul/charts/consul-server/Chart.yaml | 18 ++++++ .../consul/charts/consul-server/requirements.yaml | 21 +++++++ .../charts/consul-server/templates/NOTES.txt | 19 ++++++ .../charts/consul-server/templates/deployment.yaml | 41 +++++++++++++ .../charts/consul-server/templates/service.yaml | 38 ++++++++++++ kubernetes/consul/charts/consul-server/values.yaml | 67 ++++++++++++++++++++++ kubernetes/consul/requirements.yaml | 21 +++++++ kubernetes/consul/templates/configmap.yaml | 29 ++++++++++ .../consul/templates/consul-agent-configmap.yaml | 39 ------------- .../consul/templates/consul-agent-deployment.yaml | 57 ------------------ .../consul/templates/consul-server-deployment.yaml | 39 ------------- .../consul/templates/consul-server-service.yaml | 38 ------------ kubernetes/consul/templates/deployment.yaml | 60 +++++++++++++++++++ kubernetes/consul/templates/secrets.yaml | 7 +++ kubernetes/consul/values.yaml | 59 ++++++++++++++++--- kubernetes/onap/requirements.yaml | 2 +- 17 files changed, 375 insertions(+), 184 deletions(-) create mode 100644 kubernetes/consul/charts/consul-server/Chart.yaml create mode 100644 kubernetes/consul/charts/consul-server/requirements.yaml create mode 100644 kubernetes/consul/charts/consul-server/templates/NOTES.txt create mode 100644 kubernetes/consul/charts/consul-server/templates/deployment.yaml create mode 100644 kubernetes/consul/charts/consul-server/templates/service.yaml create mode 100644 kubernetes/consul/charts/consul-server/values.yaml create mode 100644 kubernetes/consul/requirements.yaml create mode 100644 kubernetes/consul/templates/configmap.yaml delete mode 100644 kubernetes/consul/templates/consul-agent-configmap.yaml delete mode 100644 kubernetes/consul/templates/consul-agent-deployment.yaml delete mode 100644 kubernetes/consul/templates/consul-server-deployment.yaml delete mode 100644 kubernetes/consul/templates/consul-server-service.yaml create mode 100644 kubernetes/consul/templates/deployment.yaml create mode 100644 kubernetes/consul/templates/secrets.yaml (limited to 'kubernetes') diff --git a/kubernetes/consul/Chart.yaml b/kubernetes/consul/Chart.yaml index b82c39b0be..8cb1f1bb99 100644 --- a/kubernetes/consul/Chart.yaml +++ b/kubernetes/consul/Chart.yaml @@ -13,6 +13,6 @@ # limitations under the License. apiVersion: v1 -description: ONAP Consul Heath Monitor +description: ONAP Consul Agent name: consul -version: 1.1.0 +version: 2.0.0 diff --git a/kubernetes/consul/charts/consul-server/Chart.yaml b/kubernetes/consul/charts/consul-server/Chart.yaml new file mode 100644 index 0000000000..13be08782b --- /dev/null +++ b/kubernetes/consul/charts/consul-server/Chart.yaml @@ -0,0 +1,18 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. + +apiVersion: v1 +description: ONAP Consul Server +name: consul-server +version: 2.0.0 diff --git a/kubernetes/consul/charts/consul-server/requirements.yaml b/kubernetes/consul/charts/consul-server/requirements.yaml new file mode 100644 index 0000000000..f639633537 --- /dev/null +++ b/kubernetes/consul/charts/consul-server/requirements.yaml @@ -0,0 +1,21 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. + +dependencies: + - name: common + version: ~2.0.0 + # local reference to common chart, as it is + # a part of this chart's package and will not + # be published independently to a repo (at this point) + repository: '@local' diff --git a/kubernetes/consul/charts/consul-server/templates/NOTES.txt b/kubernetes/consul/charts/consul-server/templates/NOTES.txt new file mode 100644 index 0000000000..2465e03634 --- /dev/null +++ b/kubernetes/consul/charts/consul-server/templates/NOTES.txt @@ -0,0 +1,19 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/kubernetes/consul/charts/consul-server/templates/deployment.yaml b/kubernetes/consul/charts/consul-server/templates/deployment.yaml new file mode 100644 index 0000000000..d8da8ef7ce --- /dev/null +++ b/kubernetes/consul/charts/consul-server/templates/deployment.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "common.name" . }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + name: {{ include "common.name" . }} + spec: + containers: + - image: "{{ .Values.repository | default .Values.global.repository }}/{{ .Values.image }}" + command: ["/usr/local/bin/docker-entrypoint.sh"] + args: ["agent","-server","-client","0.0.0.0","-enable-script-checks","-bootstrap-expect=3","-ui","-join","{{ include "common.fullname" . }}.{{ include "common.namespace" . }}"] + name: {{ include "common.name" . }} diff --git a/kubernetes/consul/charts/consul-server/templates/service.yaml b/kubernetes/consul/charts/consul-server/templates/service.yaml new file mode 100644 index 0000000000..3b17164afe --- /dev/null +++ b/kubernetes/consul/charts/consul-server/templates/service.yaml @@ -0,0 +1,38 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.internalPort }} + targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.name }} + - port: {{ .Values.service.internalPort2 }} + targetPort: {{ .Values.service.internalPort2 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} + name: {{ .Values.service.name2 }} + selector: + app: {{ template "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/consul/charts/consul-server/values.yaml b/kubernetes/consul/charts/consul-server/values.yaml new file mode 100644 index 0000000000..2a57e3a906 --- /dev/null +++ b/kubernetes/consul/charts/consul-server/values.yaml @@ -0,0 +1,67 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repository: nexus3.onap.org:10001 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: docker.io +image: consul:1.0.6 +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +replicaCount: 3 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + type: NodePort + name: consul-ui + nodePort: 70 + internalPort: 8500 + name2: consul-join + nodePort2: 71 + internalPort2: 8301 + +ingress: + enabled: false + +resources: {} diff --git a/kubernetes/consul/requirements.yaml b/kubernetes/consul/requirements.yaml new file mode 100644 index 0000000000..f639633537 --- /dev/null +++ b/kubernetes/consul/requirements.yaml @@ -0,0 +1,21 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. + +dependencies: + - name: common + version: ~2.0.0 + # local reference to common chart, as it is + # a part of this chart's package and will not + # be published independently to a repo (at this point) + repository: '@local' diff --git a/kubernetes/consul/templates/configmap.yaml b/kubernetes/consul/templates/configmap.yaml new file mode 100644 index 0000000000..a4270d3c87 --- /dev/null +++ b/kubernetes/consul/templates/configmap.yaml @@ -0,0 +1,29 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/consul-agent-config/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-scripts-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/consul-agent-config/scripts/*").AsConfig . | indent 2 }} diff --git a/kubernetes/consul/templates/consul-agent-configmap.yaml b/kubernetes/consul/templates/consul-agent-configmap.yaml deleted file mode 100644 index 57d52c4de1..0000000000 --- a/kubernetes/consul/templates/consul-agent-configmap.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# 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. - -#{{ if not .Values.disableConsulConsulAgent }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: consul-agent-configmap - namespace: {{ .Values.nsPrefix }} -data: -{{ tpl (.Files.Glob "resources/config/consul-agent-config/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: consul-agent-scripts-configmap - namespace: {{ .Values.nsPrefix }} -data: -{{ tpl (.Files.Glob "resources/config/consul-agent-config/scripts/*").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: consul-agent-certs-secret - namespace: {{ .Values.nsPrefix }} -data: -{{ tpl (.Files.Glob "resources/config/consul-agent-config/certs/*").AsSecrets . | indent 2 }} -#{{ end }} diff --git a/kubernetes/consul/templates/consul-agent-deployment.yaml b/kubernetes/consul/templates/consul-agent-deployment.yaml deleted file mode 100644 index 2c4a14a9b6..0000000000 --- a/kubernetes/consul/templates/consul-agent-deployment.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# 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. - -#{{ if not .Values.disableConsulConsulAgent }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - labels: - app: consul-agent - name: consul-agent - namespace: "{{ .Values.nsPrefix }}" -spec: - replicas: {{ .Values.consulAgentReplicas }} - selector: - matchLabels: - app: consul-agent - template: - metadata: - labels: - app: consul-agent - name: consul-agent - spec: - containers: - - image: "{{ .Values.consulagentRegistry }}" - command: ["/usr/local/bin/docker-entrypoint.sh"] - args: ["agent","-client","0.0.0.0","-enable-script-checks","-join","consul-server.{{ .Values.nsPrefix }}"] - name: consul-server - volumeMounts: - - mountPath: /consul/config - name: consul-agent-config - - mountPath: /consul/scripts - name: consul-agent-scripts-config - - mountPath: /consul/certs - name: consul-agent-certs-config - volumes: - - configMap: - name: consul-agent-configmap - name: consul-agent-config - - configMap: - name: consul-agent-scripts-configmap - defaultMode: 0755 - name: consul-agent-scripts-config - - secret: - secretName: consul-agent-certs-secret - name: consul-agent-certs-config -#{{ end }} diff --git a/kubernetes/consul/templates/consul-server-deployment.yaml b/kubernetes/consul/templates/consul-server-deployment.yaml deleted file mode 100644 index 50dfb77d5e..0000000000 --- a/kubernetes/consul/templates/consul-server-deployment.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# 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. - -#{{ if not .Values.disableConsulConsulServer }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - labels: - app: consul-server - name: consul-server - namespace: "{{ .Values.nsPrefix }}" -spec: - replicas: {{ .Values.consulServerReplicas }} - selector: - matchLabels: - app: consul-server - template: - metadata: - labels: - app: consul-server - name: consul-server - spec: - containers: - - image: "{{ .Values.consulserverRegistry }}" - command: ["/usr/local/bin/docker-entrypoint.sh"] - args: ["agent","-server","-client","0.0.0.0","-enable-script-checks","-bootstrap-expect=3","-ui","-join","consul-server.{{ .Values.nsPrefix }}"] - name: consul-server -#{{ end }} diff --git a/kubernetes/consul/templates/consul-server-service.yaml b/kubernetes/consul/templates/consul-server-service.yaml deleted file mode 100644 index 1a646b4aba..0000000000 --- a/kubernetes/consul/templates/consul-server-service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright © 2017 Amdocs, Bell Canada -# -# 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. - -#{{ if not .Values.disableConsulConsulServer }} -apiVersion: v1 -kind: Service -metadata: - labels: - app: consul-server - name: consul-server - namespace: "{{ .Values.nsPrefix }}" -spec: - ports: - - name: consul-ui - nodePort: {{ .Values.nodePortPrefix }}70 - port: 8500 - protocol: TCP - targetPort: 8500 - - name: consul-join - nodePort: {{ .Values.nodePortPrefix }}71 - port: 8301 - protocol: TCP - targetPort: 8301 - selector: - app: consul-server - type: {{ .Values.service.type | quote }} -#{{ end }} \ No newline at end of file diff --git a/kubernetes/consul/templates/deployment.yaml b/kubernetes/consul/templates/deployment.yaml new file mode 100644 index 0000000000..68b23917b6 --- /dev/null +++ b/kubernetes/consul/templates/deployment.yaml @@ -0,0 +1,60 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "common.name" . }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + name: {{ include "common.name" . }} + spec: + containers: + - image: "{{ .Values.repository | default .Values.global.repository }}/{{ .Values.image }}" + command: ["/usr/local/bin/docker-entrypoint.sh"] + args: ["agent","-client","0.0.0.0","-enable-script-checks","-join","{{ .Release.Name }}-{{ index .Values "consul-server" "nameOverride" }}.{{ include "common.namespace" .}}"] + name: {{ include "common.name" . }} + volumeMounts: + - mountPath: /consul/config + name: consul-agent-config + - mountPath: /consul/scripts + name: consul-agent-scripts-config + - mountPath: /consul/certs + name: consul-agent-certs-config + volumes: + - configMap: + name: {{ include "common.fullname" . }}-configmap + name: consul-agent-config + - configMap: + name: {{ include "common.fullname" . }}-scripts-configmap + defaultMode: 0755 + name: consul-agent-scripts-config + - secret: + secretName: {{ include "common.fullname" . }}-certs-secret + name: consul-agent-certs-config + diff --git a/kubernetes/consul/templates/secrets.yaml b/kubernetes/consul/templates/secrets.yaml new file mode 100644 index 0000000000..2535437329 --- /dev/null +++ b/kubernetes/consul/templates/secrets.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }}-certs-secret + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/consul-agent-config/certs/*").AsSecrets . | indent 2 }} diff --git a/kubernetes/consul/values.yaml b/kubernetes/consul/values.yaml index e86937a34c..74d0ccd048 100644 --- a/kubernetes/consul/values.yaml +++ b/kubernetes/consul/values.yaml @@ -11,12 +11,55 @@ # 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. +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + repository: nexus3.onap.org:10001 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + readinessRepository: oomk8s + readinessImage: readiness-check:1.0.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 -nsPrefix: "onap" -nodePortPrefix: 302 -consulserverRegistry: "docker.io/consul:1.0.6" -consulagentRegistry: "oomk8s/consul:1.0.0" -consulAgentReplicas: 1 -consulServerReplicas: 3 -service: - type: NodePort +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: oomk8s +image: consul:1.0.0 +pullPolicy: Always + +#subchart name +consul-server: + nameOverride: consul-server + +# flag to enable debugging - application support required +debugEnabled: false + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: {} + +ingress: + enabled: false + +resources: {} diff --git a/kubernetes/onap/requirements.yaml b/kubernetes/onap/requirements.yaml index 7d337424f4..2efbb5ca2c 100644 --- a/kubernetes/onap/requirements.yaml +++ b/kubernetes/onap/requirements.yaml @@ -41,7 +41,7 @@ dependencies: version: ~2.0.0 repository: '@local' - name: consul - version: ~1.1.0 + version: ~2.0.0 repository: '@local' condition: consul.enabled - name: dcaegen2 -- cgit 1.2.3-korg