source _functions.sh
source _common.sh
+# base_url_orchestrator=${base_url_orchestrator:-"http://localhost:9015/v2"}
+# base_url_clm=${base_url_clm:-"http://localhost:9019/v2"}
+# base_url_ncm=${base_url_ncm:-"http://localhost:9016/v2"}
+base_url_orchestrator=${base_url_orchestrator:-"http://192.168.121.29:30356/v2"}
base_url_clm=${base_url_clm:-"http://192.168.121.29:32551/v2"}
base_url_ncm=${base_url_ncm:-"http://192.168.121.29:31406/v2"}
-base_url_orchestrator=${base_url_orchestrator:-"http://192.168.121.29:30356/v2"}
-base_url_rysnc=${base_url_orchestrator:-"http://192.168.121.29:31751/v2"}
+base_url_rysnc=${base_url_rysnc:-"http://192.168.121.29:31751/v2"}
+
CSAR_DIR="/opt/csar"
csar_id="operators-cb009bfe-bbee-11e8-9766-525400435678"
{{- if .Values.deployments.etcdOperator }}
+# Synced with https://github.com/coreos/etcd-operator/blob/master/pkg/util/k8sutil/crd.go
+---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
shortNames:
- etcd
{{- end }}
+{{- if .Values.customResources.createEtcdClusterCRD }}
+---
+apiVersion: "etcd.database.coreos.com/v1beta2"
+kind: "EtcdCluster"
+metadata:
+ name: {{ .Values.etcdCluster.name }}
+ labels:
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ app: {{ template "etcd-operator.name" . }}
+ heritage: {{ .Release.Service }}
+ release: {{ .Release.Name }}
+ annotations:
+ "helm.sh/hook": "post-install"
+ "helm.sh/hook-delete-policy": "before-hook-creation"
+spec:
+ size: {{ .Values.etcdCluster.size }}
+ version: "{{ .Values.etcdCluster.version }}"
+ pod:
+{{ toYaml .Values.etcdCluster.pod | indent 4 }}
+ {{- if .Values.etcdCluster.enableTLS }}
+ TLS:
+{{ toYaml .Values.etcdCluster.tls | indent 4 }}
+ {{- end }}
+{{- end }}
\ No newline at end of file
+++ /dev/null
-{{- if .Values.customResources.createEtcdClusterCRD }}
-apiVersion: "etcd.database.coreos.com/v1beta2"
-kind: "EtcdCluster"
-metadata:
- name: {{ .Values.etcdCluster.name }}
- labels:
- chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- app: {{ template "etcd-operator.name" . }}
- heritage: {{ .Release.Service }}
- release: {{ .Release.Name }}
- annotations:
- "helm.sh/hook": "post-install"
- "helm.sh/hook-delete-policy": "before-hook-creation"
-spec:
- size: {{ .Values.etcdCluster.size }}
- version: "{{ .Values.etcdCluster.version }}"
- pod:
-{{ toYaml .Values.etcdCluster.pod | indent 4 }}
- {{- if .Values.etcdCluster.enableTLS }}
- TLS:
-{{ toYaml .Values.etcdCluster.tls | indent 4 }}
- {{- end }}
-{{- end }}
# you could use `helm template --values <values.yaml> --name release_name ... `
# and create the resources yourself to deploy on your cluster later
customResources:
- createEtcdClusterCRD: false
+ createEtcdClusterCRD: true
createBackupCRD: false
createRestoreCRD: false
return nil, pkgerrors.Wrap(err, "Failed to get the resources..")
}
n := yamlStruct.Metadata.Name + SEPARATOR + yamlStruct.Kind
+ // This might happen when the rendered file just has some comments inside, no real k8s object.
+ if n == SEPARATOR {
+ log.Info(":: Ignoring, Unable to render the template ::", log.Fields{"YAML PATH": t.FilePath})
+ continue;
+ }
resources = append(resources, resource{name: n, filecontent: string(yamlFile)})