OSM_HELM_OPTS="${OSM_HELM_OPTS} --set grafana.ingress.hosts={grafana.${OSM_DEFAULT_IP}.nip.io}"
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set prometheus.server.ingress.hosts={prometheus.${OSM_DEFAULT_IP}.nip.io}"
# OSM_HELM_OPTS="${OSM_HELM_OPTS} --set prometheus.alertmanager.ingress.hosts={alertmanager.${OSM_DEFAULT_IP}.nip.io}"
- [ -z "${INSTALL_MGMT_CLUSTER}" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.enabled=false}"
+ if [ -z "${INSTALL_MGMT_CLUSTER}" ]; then
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.enabled=false"
+ else
+ source "${HOME}/.osm/.credentials/gitea_environment.rc"
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.gitBaseUrl=${GITEA_HTTP_URL}"
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.gitUser=${GITEA_STD_USERNAME}"
+ AGE_MGMT_PUBKEY=$(tr -d '\n' < ${HOME}/.osm/.credentials/age.mgmt.pub)
+ OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.gitops.pubkey=${AGE_MGMT_PUBKEY}"
+ fi
if [ -n "${INSTALL_JUJU}" ]; then
OSM_HELM_OPTS="${OSM_HELM_OPTS} --set vca.enabled=true"
echo "Options: ${MGMTCLUSTER_INSTALL_OPTS}"
$OSM_DEVOPS/installers/mgmt-cluster/install_mgmt_cluster.sh ${MGMTCLUSTER_INSTALL_OPTS} || \
FATAL_TRACK mgmtcluster "install_mgmt_cluster.sh failed"
+ if [ -n "${INSTALL_MGMT_CLUSTER}" ]; then
+ echo "Credentials stored under ${HOME}/.osm/.credentials"
+ echo "Repos stored under ${HOME}/.osm/repos"
+ fi
track mgmtcluster mgmt_and_aux_cluster_ok
# Deploy OSM (mongodb, OSM helm chart, NGSA)
- secretRef:
name: {{ .Values.lcm.secretName | default "lcm-secret" }}
{{- end }}
+ {{- if .Values.global.gitops.enabled }}
+ - secretRef:
+ name: {{ include "osm.fullname" . }}-gitops-secret
+ {{- end }}
{{- if or .Values.vca.enabled .Values.lcm.useOsmSecret }}
env:
{{- if .Values.vca.enabled }}
--- /dev/null
+{{- if .Values.global.gitops.enabled }}
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# 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: Secret
+type: Opaque
+metadata:
+ name: {{ include "osm.fullname" . }}-gitops-secret
+ labels:
+ {{- include "osm.labels" . | nindent 4 }}
+data:
+ OSM_GITOPS_GIT_BASE_URL: {{ ( .Values.global.gitops.gitBaseUrl | default "http://git.127.0.0.1.nip.io" ) | b64enc | quote }}
+ OSM_GITOPS_USER: {{ ( .Values.global.gitops.gitUser | default "osm-developer" ) | b64enc | quote }}
+ OSM_GITOPS_PUBKEY: {{ ( .Values.global.gitops.pubkey | default ( randAlphaNum 32 ) ) | b64enc | quote }}
+{{- end }}
\ No newline at end of file
mgmtcluster:
secretName: mgmtcluster-secret
secretKey: kubeconfig
+ gitUser: osm-developer
+ # gitBaseUrl: http://git.<IP_ADDRESS>.nip.io
+ # pubkey: AGEKEY
podAnnotations: {}