From a8aeb7df0e758b6086b63fd81ad1ba586fece12c Mon Sep 17 00:00:00 2001 From: emelinda Date: Wed, 15 Jul 2026 18:04:32 +0300 Subject: [PATCH] Migrate `auth-flow` app from raw manifest definitions to HelmRelease and add to `d8-ugmk-prod` kustomization. Remove deprecated `deployment` and `service` resources and update related configurations. --- apps/auth-flow/base/deployment.yaml | 33 ------- apps/auth-flow/base/helmrelease.yaml | 94 +++++++++++++++++++ apps/auth-flow/base/kustomization.yaml | 3 +- apps/auth-flow/base/service.yaml | 15 --- .../auth-flow/d8-ugmk-prod/kustomization.yaml | 10 ++ apps/auth-flow/d8-ugmk-prod/namespace.yaml | 8 ++ apps/auth-flow/yc-k8s-test/kustomization.yaml | 2 +- apps/auth-flow/yc-k8s-test/replicas.yaml | 13 ++- clusters/d8-ugmk-prod/kustomization.yaml | 3 +- 9 files changed, 125 insertions(+), 56 deletions(-) delete mode 100644 apps/auth-flow/base/deployment.yaml create mode 100644 apps/auth-flow/base/helmrelease.yaml delete mode 100644 apps/auth-flow/base/service.yaml create mode 100644 apps/auth-flow/d8-ugmk-prod/kustomization.yaml create mode 100644 apps/auth-flow/d8-ugmk-prod/namespace.yaml diff --git a/apps/auth-flow/base/deployment.yaml b/apps/auth-flow/base/deployment.yaml deleted file mode 100644 index 037d28d..0000000 --- a/apps/auth-flow/base/deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: frontend - namespace: auth-flow - labels: - app: frontend -spec: - replicas: 1 - selector: - matchLabels: - app: frontend - template: - metadata: - labels: - app: frontend - version: stable - spec: - containers: - - name: frontend - image: cr.yandex/crp3ccidau046kdj8g9q/auth-flow-frontend:contour_fe9ea2a3 - imagePullPolicy: IfNotPresent - ports: - - name: http - containerPort: 80 - protocol: TCP - resources: - requests: - cpu: 25m - memory: 100Mi - imagePullSecrets: - - name: regcred diff --git a/apps/auth-flow/base/helmrelease.yaml b/apps/auth-flow/base/helmrelease.yaml new file mode 100644 index 0000000..b1bfc2d --- /dev/null +++ b/apps/auth-flow/base/helmrelease.yaml @@ -0,0 +1,94 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: frontend + namespace: auth-flow + +spec: + interval: 10m + + chart: + spec: + chart: universal-chart + version: "0.1.7" + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + + install: + remediation: + retries: 3 + + upgrade: + remediation: + retries: 3 + + values: + global: + env: _default + + services: + frontend: + enabled: true + + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/auth-flow-frontend:contour_fe9ea2a3 + pullPolicy: + _default: IfNotPresent + + deployment: + enabled: true + + name: + _default: frontend + + replicaCount: + _default: 1 + + port: + _default: 80 + + resources: + requests: + cpu: + _default: 25m + memory: + _default: 100Mi + + probes: + liveness: + enabled: false + readiness: + enabled: false + + service: + enabled: true + + name: + _default: frontend-svc + + type: + _default: ClusterIP + + port: + _default: 80 + + targetPort: + _default: 80 + + portName: + _default: http + + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + + commitSha: "" + gitlabUri: "" + gitlabJobUrl: "" + owner: "" diff --git a/apps/auth-flow/base/kustomization.yaml b/apps/auth-flow/base/kustomization.yaml index e409bc5..f3cf760 100644 --- a/apps/auth-flow/base/kustomization.yaml +++ b/apps/auth-flow/base/kustomization.yaml @@ -4,5 +4,4 @@ kind: Kustomization namespace: auth-flow resources: - namespace.yaml - - deployment.yaml - - service.yaml + - helmrelease.yaml diff --git a/apps/auth-flow/base/service.yaml b/apps/auth-flow/base/service.yaml deleted file mode 100644 index 020cf29..0000000 --- a/apps/auth-flow/base/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: frontend-svc - namespace: auth-flow -spec: - type: ClusterIP - selector: - app: frontend - ports: - - name: http - port: 80 - targetPort: 80 - protocol: TCP diff --git a/apps/auth-flow/d8-ugmk-prod/kustomization.yaml b/apps/auth-flow/d8-ugmk-prod/kustomization.yaml new file mode 100644 index 0000000..5d0b684 --- /dev/null +++ b/apps/auth-flow/d8-ugmk-prod/kustomization.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../base +patches: + - path: namespace.yaml + target: + kind: Namespace + name: auth-flow diff --git a/apps/auth-flow/d8-ugmk-prod/namespace.yaml b/apps/auth-flow/d8-ugmk-prod/namespace.yaml new file mode 100644 index 0000000..fc05086 --- /dev/null +++ b/apps/auth-flow/d8-ugmk-prod/namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: auth-flow + labels: + istio-injection: disabled + security.deckhouse.io/pod-policy: privileged diff --git a/apps/auth-flow/yc-k8s-test/kustomization.yaml b/apps/auth-flow/yc-k8s-test/kustomization.yaml index 85195ca..037075a 100644 --- a/apps/auth-flow/yc-k8s-test/kustomization.yaml +++ b/apps/auth-flow/yc-k8s-test/kustomization.yaml @@ -6,5 +6,5 @@ resources: patches: [] # - path: replicas.yaml # target: -# kind: Deployment +# kind: HelmRelease # name: frontend diff --git a/apps/auth-flow/yc-k8s-test/replicas.yaml b/apps/auth-flow/yc-k8s-test/replicas.yaml index f3cead9..ce58b54 100644 --- a/apps/auth-flow/yc-k8s-test/replicas.yaml +++ b/apps/auth-flow/yc-k8s-test/replicas.yaml @@ -1,8 +1,13 @@ --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease metadata: - name: auth-frontend + name: frontend namespace: auth-flow spec: - replicas: 1 + values: + services: + frontend: + deployment: + replicaCount: + _default: 1 diff --git a/clusters/d8-ugmk-prod/kustomization.yaml b/clusters/d8-ugmk-prod/kustomization.yaml index 32d8363..666f104 100644 --- a/clusters/d8-ugmk-prod/kustomization.yaml +++ b/clusters/d8-ugmk-prod/kustomization.yaml @@ -21,4 +21,5 @@ resources: - ../../apps/control-interface/d8-ugmk-prod - ../../apps/cross-section/d8-ugmk-prod - ../../apps/reviews/d8-ugmk-prod - - ../../apps/remarks/d8-ugmk-prod \ No newline at end of file + - ../../apps/remarks/d8-ugmk-prod + - ../../apps/auth-flow/d8-ugmk-prod \ No newline at end of file