diff --git a/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile b/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile index fa687fee..e5d8c5fe 100644 --- a/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile +++ b/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile @@ -32,7 +32,7 @@ executeFreeleapsPipeline { semanticReleaseEnabled: true ], [ - name: 'central-storage', + name: 'centralStorage', root: 'apps/central_storage', language: 'python', dependenciesManager: 'pip', diff --git a/freeleaps/helm-pkg/central-storage/templates/authentication/central-storage-config.yaml b/freeleaps/helm-pkg/central-storage/templates/authentication/central-storage-config.yaml deleted file mode 100644 index 4da16152..00000000 --- a/freeleaps/helm-pkg/central-storage/templates/authentication/central-storage-config.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: central-storage-config - namespace: {{ .Release.Namespace }} -type: Opaque -data: - TZ: {{ .Values.central-storage.configs.tz | b64enc | quote }} - APP_NAME: {{ .Values.central-storage.configs.appName | b64enc | quote }} - SERVICE_API_ACCESS_HOST: {{ .Values.central-storage.configs.serviceApiAccessHost | b64enc | quote }} - SERVICE_API_ACCESS_PORT: {{ .Values.central-storage.configs.serviceApiAccessPort | toString | b64enc }} - MONGODB_NAME: {{ .Values.central-storage.configs.mongodbName | b64enc | quote }} - MONGODB_PORT: {{ .Values.central-storage.configs.mongodbPort | toString | b64enc }} - MONGODB_URI: {{ .Values.central-storage.configs.mongodbUri | b64enc | quote }} - AZURE_STORAGE_DOCUMENT_API_KEY: {{ .Values.central-storage.configs.azureStorageDocumentApiKey | b64enc | quote }} - AZURE_STORAGE_DOCUMENT_API_ENDPOINT: {{ .Values.central-storage.configs.azureStorageDocumentApiEndpoint | b64enc | quote }} - \ No newline at end of file diff --git a/freeleaps/helm-pkg/central-storage/templates/authentication/deployment.yaml b/freeleaps/helm-pkg/central-storage/templates/authentication/deployment.yaml deleted file mode 100644 index b41be44b..00000000 --- a/freeleaps/helm-pkg/central-storage/templates/authentication/deployment.yaml +++ /dev/null @@ -1,98 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - app.kubernetes.io/name: "central-storage" - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/instance: {{ .Release.Name }} - name: "central-storage" - namespace: {{ .Release.Namespace | quote }} -spec: - selector: - matchLabels: - app.kubernetes.io/name: "central-storage" - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - app.kubernetes.io/managed-by: {{ .Release.Service }} - replicas: {{ .Values.central-storage.replicas }} - template: - metadata: - labels: - app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - app.kubernetes.io/name: "central-storage" - app.kubernetes.io/managed-by: {{ .Release.Service }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - containers: - - name: "central-storage" - image: "{{ coalesce .Values.central-storage.image.registry .Values.global.registry "docker.io"}}/{{ coalesce .Values.central-storage.image.repository .Values.global.repository }}/{{ .Values.central-storage.image.name }}:{{ .Values.central-storage.image.tag | default "latest" }}" - imagePullPolicy: {{ .Values.central-storage.image.imagePullPolicy | default "IfNotPresent" }} - ports: - {{- range $port := .Values.central-storage.ports }} - - containerPort: {{ $port.containerPort }} - name: {{ $port.name }} - protocol: {{ $port.protocol }} - {{- end }} - {{- if .Values.central-storage.resources }} - resources: - {{- toYaml .Values.central-storage.resources | nindent 12 }} - {{- end }} - {{- if .Values.central-storage.probes }} - {{- if and (.Values.central-storage.probes.liveness) (eq .Values.central-storage.probes.liveness.type "httpGet") }} - livenessProbe: - httpGet: - path: {{ .Values.central-storage.probes.liveness.config.path }} - port: {{ .Values.central-storage.probes.liveness.config.port }} - {{- if .Values.central-storage.probes.liveness.config.initialDelaySeconds }} - initialDelaySeconds: {{ .Values.central-storage.probes.liveness.config.initialDelaySeconds }} - {{- end }} - {{- if .Values.central-storage.probes.liveness.config.periodSeconds }} - periodSeconds: {{ .Values.central-storage.probes.liveness.config.periodSeconds }} - {{- end }} - {{- if .Values.central-storage.probes.liveness.config.timeoutSeconds }} - timeoutSeconds: {{ .Values.central-storage.probes.liveness.config.timeoutSeconds }} - {{- end }} - {{- if .Values.central-storage.probes.liveness.config.successThreshold }} - successThreshold: {{ .Values.central-storage.probes.liveness.config.successThreshold }} - {{- end }} - {{- if .Values.central-storage.probes.liveness.config.failureThreshold }} - failureThreshold: {{ .Values.central-storage.probes.liveness.config.failureThreshold }} - {{- end }} - {{- if .Values.central-storage.probes.liveness.config.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .Values.central-storage.probes.liveness.config.terminationGracePeriodSeconds }} - {{- end }} - {{- end }} - {{- if and (.Values.central-storage.probes.readiness) (eq .Values.central-storage.probes.readiness.type "httpGet") }} - readinessProbe: - httpGet: - path: {{ .Values.central-storage.probes.readiness.config.path }} - port: {{ .Values.central-storage.probes.readiness.config.port }} - {{- if .Values.central-storage.probes.readiness.config.initialDelaySeconds }} - initialDelaySeconds: {{ .Values.central-storage.probes.readiness.config.initialDelaySeconds }} - {{- end }} - {{- if .Values.central-storage.probes.readiness.config.periodSeconds }} - periodSeconds: {{ .Values.central-storage.probes.readiness.config.periodSeconds }} - {{- end }} - {{- if .Values.central-storage.probes.readiness.config.timeoutSeconds }} - timeoutSeconds: {{ .Values.central-storage.probes.readiness.config.timeoutSeconds }} - {{- end }} - {{- if .Values.central-storage.probes.readiness.config.successThreshold }} - successThreshold: {{ .Values.central-storage.probes.readiness.config.successThreshold }} - {{- end }} - {{- if .Values.central-storage.probes.readiness.config.failureThreshold }} - failureThreshold: {{ .Values.central-storage.probes.readiness.config.failureThreshold }} - {{- end }}:% - {{- if .Values.central-storage.probes.readiness.config.terminationGracePeriodSeconds }} - terminationGracePeriodSeconds: {{ .Values.central-storage.probes.readiness.config.terminationGracePeriodSeconds }} - {{- end }} - {{- end }} - {{- end}} - env: - {{- range $key, $value := .Values.central-storage.configs }} - - name: {{ $key | snakecase | upper }} - valueFrom: - secretKeyRef: - name: central-storage-config - key: {{ $key | snakecase | upper }} - {{- end }} \ No newline at end of file diff --git a/freeleaps/helm-pkg/central-storage/templates/central-storage/central-storage-config.yaml b/freeleaps/helm-pkg/central-storage/templates/central-storage/central-storage-config.yaml new file mode 100644 index 00000000..47a1fe4e --- /dev/null +++ b/freeleaps/helm-pkg/central-storage/templates/central-storage/central-storage-config.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Secret +metadata: + name: central-storage-config + namespace: {{ .Release.Namespace }} +type: Opaque +data: + TZ: {{ .Values.centralStorage.configs.tz | b64enc | quote }} + APP_NAME: {{ .Values.centralStorage.configs.appName | b64enc | quote }} + SERVICE_API_ACCESS_HOST: {{ .Values.centralStorage.configs.serviceApiAccessHost | b64enc | quote }} + SERVICE_API_ACCESS_PORT: {{ .Values.centralStorage.configs.serviceApiAccessPort | toString | b64enc }} + MONGODB_NAME: {{ .Values.centralStorage.configs.mongodbName | b64enc | quote }} + MONGODB_PORT: {{ .Values.centralStorage.configs.mongodbPort | toString | b64enc }} + MONGODB_URI: {{ .Values.centralStorage.configs.mongodbUri | b64enc | quote }} + AZURE_STORAGE_DOCUMENT_API_KEY: {{ .Values.centralStorage.configs.azureStorageDocumentApiKey | b64enc | quote }} + AZURE_STORAGE_DOCUMENT_API_ENDPOINT: {{ .Values.centralStorage.configs.azureStorageDocumentApiEndpoint | b64enc | quote }} + \ No newline at end of file diff --git a/freeleaps/helm-pkg/central-storage/templates/authentication/certificate.yaml b/freeleaps/helm-pkg/central-storage/templates/central-storage/certificate.yaml similarity index 93% rename from freeleaps/helm-pkg/central-storage/templates/authentication/certificate.yaml rename to freeleaps/helm-pkg/central-storage/templates/central-storage/certificate.yaml index f0c04471..9c8e4150 100644 --- a/freeleaps/helm-pkg/central-storage/templates/authentication/certificate.yaml +++ b/freeleaps/helm-pkg/central-storage/templates/central-storage/certificate.yaml @@ -2,7 +2,7 @@ {{ $appVersion := .Chart.AppVersion | quote }} {{ $releaseCertificate := .Release.Service }} {{ $releaseName := .Release.Name }} -{{- range $ingress := .Values.central-storage.ingresses }} +{{- range $ingress := .Values.centralStorage.ingresses }} {{- if not $ingress.tls.exists }} --- apiVersion: cert-manager.io/v1 diff --git a/freeleaps/helm-pkg/central-storage/templates/central-storage/deployment.yaml b/freeleaps/helm-pkg/central-storage/templates/central-storage/deployment.yaml new file mode 100644 index 00000000..ef87cc2d --- /dev/null +++ b/freeleaps/helm-pkg/central-storage/templates/central-storage/deployment.yaml @@ -0,0 +1,98 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/name: "central-storage" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + name: "central-storage" + namespace: {{ .Release.Namespace | quote }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: "central-storage" + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + replicas: {{ .Values.centralStorage.replicas }} + template: + metadata: + labels: + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/name: "central-storage" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + spec: + containers: + - name: "central-storage" + image: "{{ coalesce .Values.centralStorage.image.registry .Values.global.registry "docker.io"}}/{{ coalesce .Values.centralStorage.image.repository .Values.global.repository }}/{{ .Values.centralStorage.image.name }}:{{ .Values.centralStorage.image.tag | default "latest" }}" + imagePullPolicy: {{ .Values.centralStorage.image.imagePullPolicy | default "IfNotPresent" }} + ports: + {{- range $port := .Values.centralStorage.ports }} + - containerPort: {{ $port.containerPort }} + name: {{ $port.name }} + protocol: {{ $port.protocol }} + {{- end }} + {{- if .Values.centralStorage.resources }} + resources: + {{- toYaml .Values.centralStorage.resources | nindent 12 }} + {{- end }} + {{- if .Values.centralStorage.probes }} + {{- if and (.Values.centralStorage.probes.liveness) (eq .Values.centralStorage.probes.liveness.type "httpGet") }} + livenessProbe: + httpGet: + path: {{ .Values.centralStorage.probes.liveness.config.path }} + port: {{ .Values.centralStorage.probes.liveness.config.port }} + {{- if .Values.centralStorage.probes.liveness.config.initialDelaySeconds }} + initialDelaySeconds: {{ .Values.centralStorage.probes.liveness.config.initialDelaySeconds }} + {{- end }} + {{- if .Values.centralStorage.probes.liveness.config.periodSeconds }} + periodSeconds: {{ .Values.centralStorage.probes.liveness.config.periodSeconds }} + {{- end }} + {{- if .Values.centralStorage.probes.liveness.config.timeoutSeconds }} + timeoutSeconds: {{ .Values.centralStorage.probes.liveness.config.timeoutSeconds }} + {{- end }} + {{- if .Values.centralStorage.probes.liveness.config.successThreshold }} + successThreshold: {{ .Values.centralStorage.probes.liveness.config.successThreshold }} + {{- end }} + {{- if .Values.centralStorage.probes.liveness.config.failureThreshold }} + failureThreshold: {{ .Values.centralStorage.probes.liveness.config.failureThreshold }} + {{- end }} + {{- if .Values.centralStorage.probes.liveness.config.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.centralStorage.probes.liveness.config.terminationGracePeriodSeconds }} + {{- end }} + {{- end }} + {{- if and (.Values.centralStorage.probes.readiness) (eq .Values.centralStorage.probes.readiness.type "httpGet") }} + readinessProbe: + httpGet: + path: {{ .Values.centralStorage.probes.readiness.config.path }} + port: {{ .Values.centralStorage.probes.readiness.config.port }} + {{- if .Values.centralStorage.probes.readiness.config.initialDelaySeconds }} + initialDelaySeconds: {{ .Values.centralStorage.probes.readiness.config.initialDelaySeconds }} + {{- end }} + {{- if .Values.centralStorage.probes.readiness.config.periodSeconds }} + periodSeconds: {{ .Values.centralStorage.probes.readiness.config.periodSeconds }} + {{- end }} + {{- if .Values.centralStorage.probes.readiness.config.timeoutSeconds }} + timeoutSeconds: {{ .Values.centralStorage.probes.readiness.config.timeoutSeconds }} + {{- end }} + {{- if .Values.centralStorage.probes.readiness.config.successThreshold }} + successThreshold: {{ .Values.centralStorage.probes.readiness.config.successThreshold }} + {{- end }} + {{- if .Values.centralStorage.probes.readiness.config.failureThreshold }} + failureThreshold: {{ .Values.centralStorage.probes.readiness.config.failureThreshold }} + {{- end }}:% + {{- if .Values.centralStorage.probes.readiness.config.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.centralStorage.probes.readiness.config.terminationGracePeriodSeconds }} + {{- end }} + {{- end }} + {{- end}} + env: + {{- range $key, $value := .Values.centralStorage.configs }} + - name: {{ $key | snakecase | upper }} + valueFrom: + secretKeyRef: + name: central-storage-config + key: {{ $key | snakecase | upper }} + {{- end }} \ No newline at end of file diff --git a/freeleaps/helm-pkg/central-storage/templates/authentication/ingress.yaml b/freeleaps/helm-pkg/central-storage/templates/central-storage/ingress.yaml similarity index 94% rename from freeleaps/helm-pkg/central-storage/templates/authentication/ingress.yaml rename to freeleaps/helm-pkg/central-storage/templates/central-storage/ingress.yaml index 355bc77d..1f6f2504 100644 --- a/freeleaps/helm-pkg/central-storage/templates/authentication/ingress.yaml +++ b/freeleaps/helm-pkg/central-storage/templates/central-storage/ingress.yaml @@ -2,7 +2,7 @@ {{ $appVersion := .Chart.AppVersion | quote }} {{ $releaseIngress := .Release.Service }} {{ $releaseName := .Release.Name }} -{{- range $ingress := .Values.central-storage.ingresses }} +{{- range $ingress := .Values.centralStorage.ingresses }} --- apiVersion: networking.k8s.io/v1 kind: Ingress diff --git a/freeleaps/helm-pkg/central-storage/templates/authentication/service.yaml b/freeleaps/helm-pkg/central-storage/templates/central-storage/service.yaml similarity index 93% rename from freeleaps/helm-pkg/central-storage/templates/authentication/service.yaml rename to freeleaps/helm-pkg/central-storage/templates/central-storage/service.yaml index 12b19283..99855e2c 100644 --- a/freeleaps/helm-pkg/central-storage/templates/authentication/service.yaml +++ b/freeleaps/helm-pkg/central-storage/templates/central-storage/service.yaml @@ -2,7 +2,7 @@ {{ $appVersion := .Chart.AppVersion | quote }} {{ $releaseService := .Release.Service }} {{ $releaseName := .Release.Name }} -{{- range $service := .Values.central-storage.services }} +{{- range $service := .Values.centralStorage.services }} --- apiVersion: v1 kind: Service diff --git a/freeleaps/helm-pkg/central-storage/values.alpha.yaml b/freeleaps/helm-pkg/central-storage/values.alpha.yaml index 2c09ab8b..be81ee36 100644 --- a/freeleaps/helm-pkg/central-storage/values.alpha.yaml +++ b/freeleaps/helm-pkg/central-storage/values.alpha.yaml @@ -2,7 +2,7 @@ global: registry: docker.io repository: freeleaps nodeSelector: {} -central-storage: +centralStorage: replicas: 1 image: registry: docker.io diff --git a/freeleaps/helm-pkg/content/templates/certificate.yaml b/freeleaps/helm-pkg/content/templates/content/certificate.yaml similarity index 100% rename from freeleaps/helm-pkg/content/templates/certificate.yaml rename to freeleaps/helm-pkg/content/templates/content/certificate.yaml diff --git a/freeleaps/helm-pkg/content/templates/content-config.yaml b/freeleaps/helm-pkg/content/templates/content/content-config.yaml similarity index 100% rename from freeleaps/helm-pkg/content/templates/content-config.yaml rename to freeleaps/helm-pkg/content/templates/content/content-config.yaml diff --git a/freeleaps/helm-pkg/content/templates/deployment.yaml b/freeleaps/helm-pkg/content/templates/content/deployment.yaml similarity index 100% rename from freeleaps/helm-pkg/content/templates/deployment.yaml rename to freeleaps/helm-pkg/content/templates/content/deployment.yaml diff --git a/freeleaps/helm-pkg/content/templates/ingress.yaml b/freeleaps/helm-pkg/content/templates/content/ingress.yaml similarity index 100% rename from freeleaps/helm-pkg/content/templates/ingress.yaml rename to freeleaps/helm-pkg/content/templates/content/ingress.yaml diff --git a/freeleaps/helm-pkg/content/templates/service.yaml b/freeleaps/helm-pkg/content/templates/content/service.yaml similarity index 100% rename from freeleaps/helm-pkg/content/templates/service.yaml rename to freeleaps/helm-pkg/content/templates/content/service.yaml diff --git a/freeleaps/helm-pkg/notification/templates/certificate.yaml b/freeleaps/helm-pkg/notification/templates/notification/certificate.yaml similarity index 100% rename from freeleaps/helm-pkg/notification/templates/certificate.yaml rename to freeleaps/helm-pkg/notification/templates/notification/certificate.yaml diff --git a/freeleaps/helm-pkg/notification/templates/deployment.yaml b/freeleaps/helm-pkg/notification/templates/notification/deployment.yaml similarity index 100% rename from freeleaps/helm-pkg/notification/templates/deployment.yaml rename to freeleaps/helm-pkg/notification/templates/notification/deployment.yaml diff --git a/freeleaps/helm-pkg/notification/templates/ingress.yaml b/freeleaps/helm-pkg/notification/templates/notification/ingress.yaml similarity index 100% rename from freeleaps/helm-pkg/notification/templates/ingress.yaml rename to freeleaps/helm-pkg/notification/templates/notification/ingress.yaml diff --git a/freeleaps/helm-pkg/notification/templates/notification-config.yaml b/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml similarity index 100% rename from freeleaps/helm-pkg/notification/templates/notification-config.yaml rename to freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml diff --git a/freeleaps/helm-pkg/notification/templates/service.yaml b/freeleaps/helm-pkg/notification/templates/notification/service.yaml similarity index 100% rename from freeleaps/helm-pkg/notification/templates/service.yaml rename to freeleaps/helm-pkg/notification/templates/notification/service.yaml diff --git a/freeleaps/helm-pkg/payment/templates/certificate.yaml b/freeleaps/helm-pkg/payment/templates/payment/certificate.yaml similarity index 100% rename from freeleaps/helm-pkg/payment/templates/certificate.yaml rename to freeleaps/helm-pkg/payment/templates/payment/certificate.yaml diff --git a/freeleaps/helm-pkg/payment/templates/deployment.yaml b/freeleaps/helm-pkg/payment/templates/payment/deployment.yaml similarity index 100% rename from freeleaps/helm-pkg/payment/templates/deployment.yaml rename to freeleaps/helm-pkg/payment/templates/payment/deployment.yaml diff --git a/freeleaps/helm-pkg/payment/templates/ingress.yaml b/freeleaps/helm-pkg/payment/templates/payment/ingress.yaml similarity index 100% rename from freeleaps/helm-pkg/payment/templates/ingress.yaml rename to freeleaps/helm-pkg/payment/templates/payment/ingress.yaml diff --git a/freeleaps/helm-pkg/payment/templates/payment-config.yaml b/freeleaps/helm-pkg/payment/templates/payment/payment-config.yaml similarity index 100% rename from freeleaps/helm-pkg/payment/templates/payment-config.yaml rename to freeleaps/helm-pkg/payment/templates/payment/payment-config.yaml diff --git a/freeleaps/helm-pkg/payment/templates/service.yaml b/freeleaps/helm-pkg/payment/templates/payment/service.yaml similarity index 100% rename from freeleaps/helm-pkg/payment/templates/service.yaml rename to freeleaps/helm-pkg/payment/templates/payment/service.yaml