diff --git a/deployment/helm/.gitlab-ci.yml b/deployment/helm/.gitlab-ci.yml deleted file mode 100644 index a04298159e10b963a6abe85e63dad6f2cc1a3539..0000000000000000000000000000000000000000 --- a/deployment/helm/.gitlab-ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -variables: - HELPERS_FILE: helm-package.yml - -image: nexus.tech.vereign.com:6001/helm:3.5.3 - -include: - - project: '${HELPERS_PATH}' - file: '${HELPERS_FILE}' - -stages: - - lint - - package - -helm-lint: - extends: .helm-lint - stage: lint - tags: - - amd64-docker - -helm-package: - extends: .helm-package - stage: package - tags: - - amd64-docker diff --git a/deployment/helm/Chart.yaml b/deployment/helm/Chart.yaml deleted file mode 100644 index 153ed58be35559e15e39d3e6d600bd2b3eb48d6a..0000000000000000000000000000000000000000 --- a/deployment/helm/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -appVersion: v1.0.1-rc -description: cache deployment -name: cache -version: 1.0.1 -icon: "https://www.gxfs.eu/wp-content/uploads/2022/01/GFXS_DE_Logo.jpg" diff --git a/deployment/helm/LICENSE b/deployment/helm/LICENSE deleted file mode 100644 index eb9b004561b927e8b86c0f1fe039c06ffcd3a4ac..0000000000000000000000000000000000000000 --- a/deployment/helm/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -Deployment recipe for TSA cache service - - -Copyright 2022 Vereign AG - -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. diff --git a/deployment/helm/README.md b/deployment/helm/README.md deleted file mode 100644 index 072894b4835806a12034115f54feab7c6168d953..0000000000000000000000000000000000000000 --- a/deployment/helm/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# cache - -  - -cache deployment - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| autoscaling.enabled | bool | `false` | Enable autoscaling | -| autoscaling.maxReplicas | int | `3` | Maximum replicas | -| autoscaling.minReplicas | int | `1` | Minimum replicas | -| autoscaling.targetCPUUtilizationPercentage | int | `70` | CPU target for autoscaling trigger | -| autoscaling.targetMemoryUtilizationPercentage | int | `70` | Memory target for autoscaling trigger | -| cache.http.host | string | `""` | | -| cache.http.port | int | `8080` | | -| cache.http.timeout.idle | string | `"120s"` | | -| cache.http.timeout.read | string | `"10s"` | | -| cache.http.timeout.write | string | `"10s"` | | -| cache.nats.subject | string | `"external_cache_events"` | | -| cache.nats.url | string | `"nats.ocm:4222"` | | -| image.name | string | `"gaiax/cache"` | Image name | -| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | -| image.pullSecrets | string | `"deployment-key-light"` | Image pull secret when internal image is used | -| image.repository | string | `"eu.gcr.io/vrgn-infra-prj"` | | -| image.sha | string | `""` | Image sha, usually generated by the CI Uses image.tag if empty | -| image.tag | string | `""` | Image tag Uses .Chart.AppVersion if empty | -| ingress.annotations."cert-manager.io/cluster-issuer" | string | `"letsencrypt-production-http"` | | -| ingress.annotations."kubernetes.io/ingress.class" | string | `"nginx"` | | -| ingress.annotations."kubernetes.io/ingress.global-static-ip-name" | string | `"dev-light-public"` | | -| ingress.annotations."nginx.ingress.kubernetes.io/rewrite-target" | string | `"/$2"` | | -| ingress.enabled | bool | `true` | | -| ingress.frontendDomain | string | `"tsa.gxfs.dev"` | | -| ingress.frontendTlsSecretName | string | `"cert-manager-tls"` | | -| ingress.tlsEnabled | bool | `true` | | -| log.encoding | string | `"json"` | | -| log.level | string | `"debug"` | | -| metrics.enabled | bool | `true` | Enable prometheus metrics | -| metrics.port | int | `2112` | Port for prometheus metrics | -| name | string | `"cache"` | Application name | -| nameOverride | string | `""` | Ovverwrites application name | -| podAnnotations | object | `{}` | | -| redis.addr | string | `"redis-public-master.infra:6379"` | | -| redis.db | int | `0` | | -| redis.expiration | string | `"1h"` | | -| redis.pass | string | `""` | | -| redis.user | string | `""` | | -| replicaCount | int | `1` | Default number of instances to start | -| resources.limits.cpu | string | `"150m"` | | -| resources.limits.memory | string | `"128Mi"` | | -| resources.requests.cpu | string | `"25m"` | | -| resources.requests.memory | string | `"64Mi"` | | -| security.runAsGid | int | `0` | Group used by the apps | -| security.runAsNonRoot | bool | `false` | by default, apps run as non-root | -| security.runAsUid | int | `0` | User used by the apps | -| service.port | int | `8080` | | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.10.0](https://github.com/norwoodj/helm-docs/releases/v1.10.0) diff --git a/deployment/helm/ci/argocd.yaml b/deployment/helm/ci/argocd.yaml deleted file mode 100644 index 05d3988b32c0063c6b55d3c4fa957e0b205325cd..0000000000000000000000000000000000000000 --- a/deployment/helm/ci/argocd.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# ArgoCD Application Definition -source: - repoURL: "{{ .RepoURL }}" - path: "{{ .Path }}" - targetRevision: "{{ .TargetRevision }}" - -applications: - - name: apps-of-apps - namespace: argocd - enabled: true - k8sAPI: https://kubernetes.default.svc - project: my-project - sourcePath: "." - sourceRef: "main" - chartName: "my-name" - ignoreDifferences: - - group: admissionregistration.k8s.io - kind: ValidatingWebhookConfiguration - name: cert-manager-webhook - jsonPointers: - - /webhooks/0/namespaceSelector/matchExpressions/2 - helmValues: - - my_chart/values.yaml # Include values from the Helm chart - - - name: example-app - enabled: true - sourcePath: "." - helmValues: - - my_chart/values.yaml # Include values from the Helm chart - - my_chart/example-values.yaml # Include additional example-specific values diff --git a/deployment/helm/templates/_helpers.tpl b/deployment/helm/templates/_helpers.tpl deleted file mode 100644 index 6955ccba19a0e68b2918305e46546f4741fea0aa..0000000000000000000000000000000000000000 --- a/deployment/helm/templates/_helpers.tpl +++ /dev/null @@ -1,88 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "app.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "app.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" $name .Release.Namespace | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create instance name based on app version and short image sha. -*/}} -{{- define "app.revision" -}} -{{- default .Release.Name .Values.appRel | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "app.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "app.labels" -}} -helm.sh/chart: {{ include "app.chart" . }} -{{ include "app.selectorLabels" . }} -app.kubernetes.io/version: {{ .Chart.AppVersion }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "app.selectorLabels" -}} -app.kubernetes.io/name: {{ include "app.name" . }} -app.kubernetes.io/component: {{ include "app.fullname" . }} -{{- end -}} - -{{/* -Metrics Annotations -*/}} -{{- define "app.metricsAnnotations" -}} -{{- if .Values.metrics.enabled -}} -prometheus.io/scrape: "true" -prometheus.io/port: "{{ .Values.metrics.port }}" -prometheus.io/path: {{ .Values.metrics.path | default "/metrics" | quote }} -{{- end -}} -{{- end -}} - -{{/* -Image string -*/}} -{{- define "app.image" -}} -{{- if .Values.image.sha -}} -{{ .Values.image.repository }}/{{ .Values.image.name }}@{{ .Values.image.sha }} -{{- else -}} -{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }} -{{- end -}} -{{- end -}} - -{{/* -Security context -*/}} -{{- define "app.securitycontext" -}} -runAsNonRoot: {{ .Values.security.runAsNonRoot | default false }} -runAsGroup: {{ .Values.security.runAsGid | default 0 }} -runAsUser: {{ .Values.security.runAsUid | default 0 }} -fsGroup: {{ .Values.security.runAsGid | default 0 }} -{{- end -}} - -{{/* -PostgreSQL Connection string URI -*/}} -{{- define "app.postgresql.connectionstring" -}} -postgresql://{{ .Values.connectionManager.database.user }}:{{ .Values.connectionManager.database.password }}@{{ .Values.connectionManager.database.host }}:{{ .Values.connectionManager.database.port }}/{{ .Release.Namespace }}_{{ include "app.name" . | replace "-" "_" }}?schema={{ .Values.connectionManager.database.schema }} -{{- end -}} - diff --git a/deployment/helm/templates/argocd/argo-application.yaml b/deployment/helm/templates/argocd/argo-application.yaml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/deployment/helm/templates/argocd/argo-project.yaml b/deployment/helm/templates/argocd/argo-project.yaml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/deployment/helm/templates/deployment.yaml b/deployment/helm/templates/deployment.yaml deleted file mode 100644 index 5b8c0d75cbcfcc60c343a6773ac67ff0916413b3..0000000000000000000000000000000000000000 --- a/deployment/helm/templates/deployment.yaml +++ /dev/null @@ -1,104 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "app.name" . }}" - namespace: {{ .Release.Namespace }} - labels: - {{- include "app.labels" . | nindent 4 }} - app.kubernetes.io/instance: {{ include "app.revision" . }} - app.kubernetes.io/part-of: rse -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - selector: - matchLabels: - {{- include "app.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "app.labels" . | nindent 8 }} - annotations: - {{- include "app.metricsAnnotations" . | nindent 8 }} -{{- if .Values.podAnnotations }} -{{ toYaml .Values.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: -{{- include "app.securitycontext" . | nindent 8 }} - imagePullSecrets: - - name: {{ .Values.image.pullSecrets }} - containers: - - name: {{ template "app.name" . }} - image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ default .Chart.AppVersion .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - - name: LOG_LEVEL - value: {{ .Values.log.level | default "INFO" }} - - name: LOG_ENCODING - value: {{ .Values.log.encoding | default "json" }} - - name: HTTP_HOST - value: {{ .Values.cache.http.host | quote }} - - name: HTTP_PORT - value: {{ .Values.cache.http.port | quote }} - - name: HTTP_IDLE_TIMEOUT - value: {{ .Values.cache.http.timeout.idle | quote }} - - name: HTTP_READ_TIMEOUT - value: {{ .Values.cache.http.timeout.read | quote }} - - name: HTTP_WRITE_TIMEOUT - value: {{ .Values.cache.http.timeout.write | quote }} - {{- if .Values.redis.addr }} - - name: REDIS_ADDR - value: {{ .Values.redis.addr | quote }} - {{- end }} - {{- if .Values.redis.user }} - - name: REDIS_USER - value: {{ .Values.redis.user | quote }} - {{- end }} - {{- if .Values.redis.pass }} - - name: REDIS_PASS - value: {{ .Values.redis.pass | quote }} - {{- end }} - {{- if .Values.redis.db }} - - name: REDIS_DB - {{- end }} - value: {{ .Values.redis.db | quote }} - - name: REDIS_EXPIRATION - value: {{ .Values.redis.expiration | quote }} - - name: NATS_ADDR - value: {{ .Values.cache.nats.url | quote }} - - name: NATS_SUBJECT - value: {{ .Values.cache.nats.subject | quote }} - {{- if .Values.secretEnv }} - {{- range $key, $value := .Values.secretEnv }} - - name: "{{ $key }}" - valueFrom: - secretKeyRef: - name: "{{ $value.name }}" - key: "{{ $value.key }}" - {{- end }} - {{- end }} -{{- if .Values.extraVars }} -{{ toYaml .Values.extraVars | indent 8 }} -{{- end }} - ports: - {{- if .Values.metrics.enabled }} - - name: monitoring - containerPort: {{ .Values.metrics.port }} - {{- end }} - - name: http - containerPort: {{ .Values.cache.http.port }} - readinessProbe: - httpGet: - path: /readiness - port: {{ .Values.cache.http.port }} - initialDelaySeconds: 5 - periodSeconds: 5 - successThreshold: 2 - failureThreshold: 2 - timeoutSeconds: 5 - resources: -{{ toYaml .Values.resources | indent 10 }} diff --git a/deployment/helm/templates/hpa.yaml b/deployment/helm/templates/hpa.yaml deleted file mode 100644 index fc5c29e7463c24756cfa83754e8ab9336be7b8c2..0000000000000000000000000000000000000000 --- a/deployment/helm/templates/hpa.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - labels: - {{- include "app.labels" . | nindent 4 }} - name: {{ template "app.name" . }} - namespace: {{ .Release.Namespace }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "app.name" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: -{{- with .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu -{{- end }} -{{- with .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory -{{- end }} -{{- end }} \ No newline at end of file diff --git a/deployment/helm/templates/ingress.yaml b/deployment/helm/templates/ingress.yaml deleted file mode 100644 index 2af1a849a66ca894dddd75ef3d30557f6ed2ca3b..0000000000000000000000000000000000000000 --- a/deployment/helm/templates/ingress.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.ingress.enabled }} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ template "app.name" . }} - namespace: {{ .Release.Namespace }} - annotations: -{{ toYaml .Values.ingress.annotations | indent 4 }} - labels: - {{- include "app.labels" . | nindent 4 }} -spec: -{{- if .Values.ingress.tlsEnabled }} - tls: - - hosts: - - {{ .Values.ingress.frontendDomain }} - secretName: {{ .Values.ingress.frontendTlsSecretName }} -{{- end }} - rules: - - host: {{ .Values.ingress.frontendDomain }} - http: - paths: - - path: /{{ template "app.name" . }}(/|$)(.*) - pathType: Prefix - backend: - service: - name: {{ template "app.name" . }} - port: - number: {{ .Values.service.port }} -{{- end }} diff --git a/deployment/helm/templates/istio/autorization-rules.yaml b/deployment/helm/templates/istio/autorization-rules.yaml deleted file mode 100644 index 9800b2de4c0401fd41c2a49ca842cfd7cb905a38..0000000000000000000000000000000000000000 --- a/deployment/helm/templates/istio/autorization-rules.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# templates/istio/authorization-rules.yaml -apiVersion: security.istio.io/v1beta1 -kind: AuthorizationPolicy -metadata: - name: { { include "my_chart.fullname" . } } -spec: - selector: - matchLabels: - app.kubernetes.io/name: { { include "my_chart.name" . } } - app.kubernetes.io/instance: { { .Release.Name } } - action: ALLOW - rules: - - from: - - source: - principals: ["cluster.local/ns/default/sa/default"] - to: - - operation: - methods: ["GET"] diff --git a/deployment/helm/templates/istio/gateway.yaml b/deployment/helm/templates/istio/gateway.yaml deleted file mode 100644 index 65dfaa3545bab83e5064d7f7f7d222d48bdf66e6..0000000000000000000000000000000000000000 --- a/deployment/helm/templates/istio/gateway.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# templates/istio/gateway.yaml -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: my-chart-gateway -spec: - selector: - istio: ingressgateway - servers: - - port: - number: 80 - name: http - protocol: HTTP - hosts: - - "*" diff --git a/deployment/helm/templates/istio/virtual-service.yaml b/deployment/helm/templates/istio/virtual-service.yaml deleted file mode 100644 index 28307d401c7d3232454db523645c09e93977d789..0000000000000000000000000000000000000000 --- a/deployment/helm/templates/istio/virtual-service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# templates/istio/virtual-service.yaml -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: { { include "my_chart.fullname" . } } -spec: - hosts: - - "*" - gateways: - - my-chart-gateway - http: - - route: - - destination: - host: { { include "my_chart.fullname" . } } - port: - number: 80 diff --git a/deployment/helm/templates/service.yaml b/deployment/helm/templates/service.yaml deleted file mode 100644 index 92420d98644c0abaa143b78a043163e6aff2877c..0000000000000000000000000000000000000000 --- a/deployment/helm/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "app.name" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "app.labels" . | nindent 4 }} -spec: - clusterIP: None - ports: - - name: http - targetPort: {{ .Values.service.port }} - port: {{ .Values.cache.http.port }} - selector: - {{- include "app.selectorLabels" . | nindent 4 }} diff --git a/deployment/helm/values-override.yaml b/deployment/helm/values-override.yaml deleted file mode 100644 index 82db69e74372f88d5e543c839b67b9cb462bb96a..0000000000000000000000000000000000000000 --- a/deployment/helm/values-override.yaml +++ /dev/null @@ -1,11 +0,0 @@ -image: - repository: registry.gitlab.com/gaia-x/data-infrastructure-federation-services/tsa - # -- Image name - name: cache - -redis: - addr: "redis-master.tsa:6379" - -ingress: - frontendDomain: tsa.gxfs.dev - frontendTlsSecretName: wildcard-gxfs-dev diff --git a/deployment/helm/values.yaml b/deployment/helm/values.yaml deleted file mode 100644 index a7875e2e07765f7d12a0c4a4c2ac02d188fb228c..0000000000000000000000000000000000000000 --- a/deployment/helm/values.yaml +++ /dev/null @@ -1,115 +0,0 @@ -# -- Default number of instances to start -replicaCount: 1 -# -- Application name -name: cache -# -- Ovverwrites application name -nameOverride: "" - -image: - repository: eu.gcr.io/vrgn-infra-prj - # -- Image name - name: gaiax/cache - # -- Image tag - # Uses .Chart.AppVersion if empty - tag: "" - # -- Image sha, usually generated by the CI - # Uses image.tag if empty - sha: "" - # -- Image pull policy - pullPolicy: IfNotPresent - # -- Image pull secret when internal image is used - pullSecrets: deployment-key-light - - -podAnnotations: {} -## -## Pass extra environment variables to the container. -## -# extraVars: -# - name: EXTRA_VAR_1 -# value: extra-var-value-1 -# - name: EXTRA_VAR_2 -# value: extra-var-value-2 -## -## Create new service when true, and use the specified uner name when set to the name specified -## - -resources: - requests: - cpu: 25m - memory: 64Mi - limits: - cpu: 150m - memory: 128Mi - -## Configure pod autoscaling -## - -autoscaling: - # -- Enable autoscaling - enabled: false - # -- Minimum replicas - minReplicas: 1 - # -- Maximum replicas - maxReplicas: 3 - # -- CPU target for autoscaling trigger - targetCPUUtilizationPercentage: 70 - # -- Memory target for autoscaling trigger - targetMemoryUtilizationPercentage: 70 -## -## Prometheus Exporter / Metrics -## - -metrics: - # -- Enable prometheus metrics - enabled: true - # -- Port for prometheus metrics - port: 2112 - -log: - level: "debug" - encoding: json - -## -## Kubernetes [SecurityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) object. -## - -security: - # -- by default, apps run as non-root - runAsNonRoot: false - # -- User used by the apps - runAsUid: 0 - # -- Group used by the apps - runAsGid: 0 -## -## -service: - port: 8080 - -cache: - http: - host: "" - port: 8080 - timeout: - idle: 120s - read: 10s - write: 10s - nats: - url: nats:4222 - subject: external_cache_events - -redis: - addr: "redis-master:6379" - user: "" - pass: "" - db: 0 - expiration: 1h - -ingress: - enabled: true - annotations: - kubernetes.io/ingress.class: nginx - nginx.ingress.kubernetes.io/rewrite-target: /$2 - tlsEnabled: true - frontendDomain: tsa.xfsc.dev - frontendTlsSecretName: cert-manager-tls \ No newline at end of file