diff --git a/apps/cross-section/base/deployment.yaml b/apps/cross-section/base/deployment.yaml deleted file mode 100644 index c3c684b..0000000 --- a/apps/cross-section/base/deployment.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cross-section-static - namespace: cross-section - labels: - app: cross-section-static -spec: - replicas: 2 - selector: - matchLabels: - app: cross-section-static - template: - metadata: - labels: - app: cross-section-static - spec: - containers: - - name: frontend - image: cr.yandex/crp3ccidau046kdj8g9q/cross-section-app:production_e09e648b - imagePullPolicy: IfNotPresent - ports: - - name: http - containerPort: 80 - protocol: TCP - livenessProbe: - httpGet: - path: /ping - port: 80 - initialDelaySeconds: 10 - periodSeconds: 10 - failureThreshold: 10 - readinessProbe: - httpGet: - path: /ping - port: 80 - initialDelaySeconds: 10 - periodSeconds: 10 - failureThreshold: 20 - resources: - requests: - cpu: 25m - memory: 100Mi - imagePullSecrets: - - name: regcred diff --git a/apps/cross-section/base/helmrelease.yaml b/apps/cross-section/base/helmrelease.yaml new file mode 100644 index 0000000..8d12133 --- /dev/null +++ b/apps/cross-section/base/helmrelease.yaml @@ -0,0 +1,96 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cross-section-static + namespace: cross-section + +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 + driftDetection: + mode: enabled + + values: + global: + env: _default + + services: + frontend: + enabled: true + + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cross-section-app:production_e09e648b + pullPolicy: + _default: IfNotPresent + + deployment: + enabled: true + + name: + _default: cross-section-static + + 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: cross-section-static + + 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/cross-section/base/kustomization.yaml b/apps/cross-section/base/kustomization.yaml index eabd449..53e4234 100644 --- a/apps/cross-section/base/kustomization.yaml +++ b/apps/cross-section/base/kustomization.yaml @@ -4,5 +4,4 @@ kind: Kustomization namespace: cross-section resources: - namespace.yaml - - deployment.yaml - - service.yaml + - helmrelease.yaml diff --git a/apps/cross-section/base/service.yaml b/apps/cross-section/base/service.yaml deleted file mode 100644 index 555507e..0000000 --- a/apps/cross-section/base/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: cross-section-static - namespace: cross-section -spec: - type: ClusterIP - selector: - app: cross-section-static - ports: - - name: http - port: 80 - targetPort: 80 - protocol: TCP diff --git a/apps/cross-section/d8-ugmk-prod/kustomization.yaml b/apps/cross-section/d8-ugmk-prod/kustomization.yaml new file mode 100644 index 0000000..e94f0c3 --- /dev/null +++ b/apps/cross-section/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: cross-section diff --git a/apps/cross-section/d8-ugmk-prod/namespace.yaml b/apps/cross-section/d8-ugmk-prod/namespace.yaml new file mode 100644 index 0000000..10b2d97 --- /dev/null +++ b/apps/cross-section/d8-ugmk-prod/namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: cross-section + labels: + istio-injection: disabled + security.deckhouse.io/pod-policy: privileged diff --git a/apps/cross-section/yc-k8s-test/kustomization.yaml b/apps/cross-section/yc-k8s-test/kustomization.yaml index 141572c..e62ad10 100644 --- a/apps/cross-section/yc-k8s-test/kustomization.yaml +++ b/apps/cross-section/yc-k8s-test/kustomization.yaml @@ -6,5 +6,5 @@ resources: patches: - path: replicas.yaml target: - kind: Deployment + kind: HelmRelease name: cross-section-static diff --git a/apps/cross-section/yc-k8s-test/replicas.yaml b/apps/cross-section/yc-k8s-test/replicas.yaml index eff7632..8a2a9db 100644 --- a/apps/cross-section/yc-k8s-test/replicas.yaml +++ b/apps/cross-section/yc-k8s-test/replicas.yaml @@ -1,8 +1,13 @@ --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease metadata: name: cross-section-static namespace: cross-section 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 6718742..7a66551 100644 --- a/clusters/d8-ugmk-prod/kustomization.yaml +++ b/clusters/d8-ugmk-prod/kustomization.yaml @@ -18,4 +18,5 @@ resources: # apps - ../../apps/attachments/d8-ugmk-prod - - ../../apps/control-interface/d8-ugmk-prod \ No newline at end of file + - ../../apps/control-interface/d8-ugmk-prod + - ../../apps/cross-section/d8-ugmk-prod \ No newline at end of file