aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-12-09 08:20:25 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-12-09 08:22:17 +0100
commit1ba8bf7a96b1178e82bb5f51d23f4e32837be9ed (patch)
tree5eb73f6f70e552f0823a57374f670dc7468f7428 /templates
parent85b5af5058bbda19b557add185d917f60c2188ee (diff)
Remove code on master branch
As code has been moved to main repo, we remove the code here and add a README explaining Issue-ID: OOM-2513 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I80693e7f5c6c18bece7088eb29e2d17566f3993f
Diffstat (limited to 'templates')
-rw-r--r--templates/NOTES.txt25
-rw-r--r--templates/_ingress_svc_hostname.tpl157
-rw-r--r--templates/configmap.yaml52
-rw-r--r--templates/deployment.yaml117
-rw-r--r--templates/ingress.yaml1
-rw-r--r--templates/pv.yaml40
-rw-r--r--templates/pvc.yaml39
-rw-r--r--templates/service.yaml39
8 files changed, 0 insertions, 470 deletions
diff --git a/templates/NOTES.txt b/templates/NOTES.txt
deleted file mode 100644
index fe7c931..0000000
--- a/templates/NOTES.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright © 2018 Amdocs, Bell Canada
-#
-# This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE
-#
-# Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
-
-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.name" . }})
- 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.name" . }}'
- export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -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 "common.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/templates/_ingress_svc_hostname.tpl b/templates/_ingress_svc_hostname.tpl
deleted file mode 100644
index 160bfbf..0000000
--- a/templates/_ingress_svc_hostname.tpl
+++ /dev/null
@@ -1,157 +0,0 @@
-{{/*
-# Copyright © 2020 Samsung Electronics
-#
-# 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.
-*/}}
-
-
-{{/*
- For internal use only!
-
- Return true value if robot via ingress test is enabled
-
- The template takes two arguments:
- - .parent: environment (.)
- - .key: robot test component name
-*/}}
-
-{{- define "robot.ingress.svchost._isen" -}}
- {{- $key := .key -}}
- {{- $master := .parent.Values.config.useIngressHost -}}
- {{- if hasKey $master "enabled" -}}
- {{- if (index $master "enabled") -}}
- {{- if hasKey $master $key -}}
- {{- $en_parent := (index $master $key) -}}
- {{- if hasKey $en_parent "enabled" -}}
- {{- default "" (index $en_parent "enabled") -}}
- {{- else -}}
- {{- "" -}}
- {{- end -}}
- {{- else -}}
- {{- "" -}}
- {{- end -}}
- {{- else -}}
- {{- "" -}}
- {{- end -}}
- {{- else -}}
- {{- "" -}}
- {{- end -}}
-{{- end -}}
-
-{{/*
- For internal use only!
-
- Return ingress alternative hotname if present
-
- The template takes two arguments:
- - .parent: environment (.)
- - .key: robot test component name
-*/}}
-
-{{- define "robot.ingress.svchost._inghost" -}}
- {{- $key := .key -}}
- {{- $master := .parent.Values.config.useIngressHost -}}
- {{- if hasKey $master $key -}}
- {{- $h_parent := (index $master $key) -}}
- {{- if hasKey $h_parent "hostname" -}}
- {{- default "" (index $h_parent "hostname") -}}
- {{- else -}}
- {{- "" -}}
- {{- end -}}
- {{- else -}}
- {{- "" -}}
- {{- end -}}
-{{- end -}}
-
-{{/*
- For internal use only!
-
- Return robot target port depending on the robot test configuration
- or default value if config is not available
-
- The template takes two arguments:
- - .parent: environment (.)
- - .key: robot test component name
-*/}}
-{{- define "robot.ingress.svchost._port" -}}
- {{- $key := .key -}}
- {{- $master := .parent.Values.config.useIngressHost -}}
- {{- if hasKey $master $key -}}
- {{- $https_parent := (index $master $key) -}}
- {{- if hasKey $https_parent "https" -}}
- {{- $ishttps := (index $https_parent "https") -}}
- {{- ternary 443 80 $ishttps -}}
- {{- else -}}
- {{- 80 -}}
- {{- end -}}
- {{- else -}}
- {{- 80 -}}
- {{- end -}}
-{{- end -}}
-
-{{/*
- Return the hostname for tested compoment by robot
- if the ingress is enabled it return cluster ingress
- controller hostname. If the ingress controller in robot
- test is disabled it returns the internal cluster hostname
-
- The template takes two arguments:
- - .root: root environment (.)
- - .hostname: basename of host
-
- Return string target hostname for robot test on particular component
-*/}}
-{{- define "robot.ingress.svchost" -}}
- {{- $hostname := required "service hostname" .hostname -}}
- {{- $tplhname := $hostname | replace "-" "_" -}}
- {{- $ingress_enabled := include "robot.ingress.svchost._isen" (dict "parent" .root "key" $tplhname) -}}
- {{- if $ingress_enabled -}}
- {{- if .root.Values.global.ingress -}}
- {{- if .root.Values.global.ingress.virtualhost -}}
- {{- $domain := .root.Values.global.ingress.virtualhost.baseurl -}}
- {{- $ihostname := default $hostname (include "robot.ingress.svchost._inghost" (dict "parent" .root "key" $tplhname)) -}}
- {{- printf "%s.%s" $ihostname $domain -}}
- {{- end -}}
- {{- end -}}
- {{- else -}}
- {{- $domain := include "common.namespace" .root -}}
- {{- printf "%s.%s" $hostname $domain -}}
- {{- end -}}
-{{- end -}}
-
-
-{{/*
- Return the target port for the robot testing purpose
- if the ingress is enabled it return cluster ingress
- controller port. If the target port doesn't exists
- it return default port
-
- The template takes three arguments:
- - .root: root environment (.)
- - .hostname: basename of host
- - .port Default target port
-
- Return target port for tested components
-*/}}
-{{- define "robot.ingress.port" -}}
- {{- $hostname := required "service hostname" .hostname -}}
- {{- $port := required "service port" .port -}}
- {{- $tplhname := $hostname | replace "-" "_" -}}
- {{- $ingress_enabled := include "robot.ingress.svchost._isen" (dict "parent" .root "key" $tplhname) -}}
- {{- if $ingress_enabled -}}
- {{- include "robot.ingress.svchost._port" (dict "parent" .root "key" $tplhname) -}}
- {{- else -}}
- {{- printf "%d" $port -}}
- {{- end -}}
-{{- end -}}
-
diff --git a/templates/configmap.yaml b/templates/configmap.yaml
deleted file mode 100644
index 5b41aa4..0000000
--- a/templates/configmap.yaml
+++ /dev/null
@@ -1,52 +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.
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-eteshare-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/eteshare/config/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-lighttpd-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/lighttpd/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-lighttpd-ssl-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/lighttpd/ssl/*").AsConfig . | indent 2 }}
diff --git a/templates/deployment.yaml b/templates/deployment.yaml
deleted file mode 100644
index a466189..0000000
--- a/templates/deployment.yaml
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright © 2018 Amdocs, Bell Canada, AT&T
-#
-# 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: apps/v1
-kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
-spec:
- selector:
- matchLabels:
- app: {{ include "common.name" . }}
- replicas: {{ .Values.replicaCount }}
- template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
- spec:
- hostAliases:
- - ip: {{ .Values.kubernetesExternalIp }}
- hostnames:
- - "portal.api.simpledemo.onap.org"
- - "vid.api.simpledemo.onap.org"
- - "sdc.api.fe.simpledemo.onap.org"
- - "portal-sdk.simpledemo.onap.org"
- - "policy.api.simpledemo.onap.org"
- - "aai.api.sparky.simpledemo.onap.org"
- - "aai.ui.simpledemo.onap.org"
- - "cli.api.simpledemo.onap.org"
- - "so-monitoring"
- containers:
- - name: {{ include "common.name" . }}
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- ports:
- - containerPort: {{ .Values.service.internalPort }}
- {{ if .Values.liveness.enabled }}
- livenessProbe:
- tcpSocket:
- port: {{ .Values.service.internalPort }}
- initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.liveness.periodSeconds }}
- {{ end }}
- readinessProbe:
- tcpSocket:
- port: {{ .Values.service.internalPort }}
- initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
- periodSeconds: {{ .Values.readiness.periodSeconds }}
- volumeMounts:
- - name: dshm
- mountPath: /dev/shm
- - name: localtime
- mountPath: /etc/localtime
- readOnly: true
- - name: robot-eteshare
- mountPath: /share/config
- - name: robot-lighttpd
- mountPath: /etc/lighttpd
- - name: robot-lighttpd-ssl
- mountPath: /etc/lighttpd/ssl
- - name: robot-logs
- mountPath: /share/logs
- resources:
-{{ include "common.resources" . }}
- {{- if .Values.nodeSelector }}
- nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
- {{- end -}}
- {{- if .Values.affinity }}
- affinity:
-{{ toYaml .Values.affinity | indent 8 }}
- {{- end }}
- volumes:
- {{- if .Values.persistence.enabled }}
- - name: robot-logs
- persistentVolumeClaim:
- claimName: {{ include "common.fullname" . }}
- {{- else }}
- emptyDir: {}
- {{- end }}
- - name: dshm
- emptyDir:
- medium: Memory
- - name: localtime
- hostPath:
- path: /etc/localtime
- - name: robot-eteshare
- configMap:
- name: {{ include "common.fullname" . }}-eteshare-configmap
- defaultMode: 0755
- - name: robot-lighttpd
- configMap:
- name: {{ include "common.fullname" . }}-lighttpd-configmap
- defaultMode: 0755
- - name: robot-lighttpd-ssl
- configMap:
- name: {{ include "common.fullname" . }}-lighttpd-ssl-configmap
- defaultMode: 0600
- imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/templates/ingress.yaml b/templates/ingress.yaml
deleted file mode 100644
index 8f87c68..0000000
--- a/templates/ingress.yaml
+++ /dev/null
@@ -1 +0,0 @@
-{{ include "common.ingress" . }}
diff --git a/templates/pv.yaml b/templates/pv.yaml
deleted file mode 100644
index 1226402..0000000
--- a/templates/pv.yaml
+++ /dev/null
@@ -1,40 +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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-{{- if eq "True" (include "common.needPV" .) -}}
-kind: PersistentVolume
-apiVersion: v1
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
- release: {{ include "common.release" . }}
- heritage: "{{ .Release.Service }}"
- name: {{ include "common.fullname" . }}
-spec:
- capacity:
- storage: {{ .Values.persistence.size}}
- accessModes:
- - {{ .Values.persistence.accessMode }}
- storageClassName: "{{ include "common.fullname" . }}-data"
- persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
- hostPath:
- path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ .Values.persistence.mountSubPath }}
-{{- end -}}
-{{- end -}}
diff --git a/templates/pvc.yaml b/templates/pvc.yaml
deleted file mode 100644
index 6c18ca0..0000000
--- a/templates/pvc.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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- release: {{ include "common.release" . }}
- heritage: "{{ .Release.Service }}"
-{{- if .Values.persistence.annotations }}
- annotations:
-{{ toYaml .Values.persistence.annotations | indent 4 }}
-{{- end }}
-spec:
- accessModes:
- - {{ .Values.persistence.accessMode }}
- storageClassName: {{ include "common.storageClass" . }}
- resources:
- requests:
- storage: {{ .Values.persistence.size }}
-{{- end -}}
diff --git a/templates/service.yaml b/templates/service.yaml
deleted file mode 100644
index d1e3bec..0000000
--- a/templates/service.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.
-
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "common.servicename" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
-spec:
- type: {{ .Values.service.type }}
- ports:
- {{if eq .Values.service.type "NodePort" -}}
- - port: {{ .Values.service.externalPort }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.portName | default "http" }}
- {{- else -}}
- - port: {{ .Values.service.externalPort }}
- targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName | default "http" }}
- {{- end}}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}