Migrate srx-admin from raw manifest definitions to HelmRelease and move from control-interface namespace to django. Remove deprecated resources and update related configurations.
This commit is contained in:
parent
d60dc2a5e1
commit
182787e33b
@ -1,110 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: attachments
|
|
||||||
namespace: attachments
|
|
||||||
spec:
|
|
||||||
interval: 10m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: universal-chart
|
|
||||||
version: "0.1.9"
|
|
||||||
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:
|
|
||||||
attachments:
|
|
||||||
enabled: true
|
|
||||||
serviceAccount:
|
|
||||||
enabled:
|
|
||||||
_default: true
|
|
||||||
name:
|
|
||||||
_default: attachments-vault
|
|
||||||
deployment:
|
|
||||||
enabled: true
|
|
||||||
name:
|
|
||||||
_default: attachments
|
|
||||||
replicaCount:
|
|
||||||
_default: 1
|
|
||||||
port:
|
|
||||||
_default: 8000
|
|
||||||
command:
|
|
||||||
_default: ["/bin/bash", "-ec"]
|
|
||||||
args:
|
|
||||||
_default:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/attachments-db ] && . /vault/secrets/attachments-db
|
|
||||||
[ -f /vault/secrets/attachments-s3 ] && . /vault/secrets/attachments-s3
|
|
||||||
set +a
|
|
||||||
exec /opt/attachments/entrypoint.sh
|
|
||||||
image:
|
|
||||||
name:
|
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/attachments:feature_6238c882
|
|
||||||
pullPolicy:
|
|
||||||
_default: IfNotPresent
|
|
||||||
service:
|
|
||||||
enabled: true
|
|
||||||
name:
|
|
||||||
_default: attachments-service
|
|
||||||
type:
|
|
||||||
_default: ClusterIP
|
|
||||||
port:
|
|
||||||
_default: 8000
|
|
||||||
targetPort:
|
|
||||||
_default: 8000
|
|
||||||
portName:
|
|
||||||
_default: http
|
|
||||||
imagePullSecrets:
|
|
||||||
enabled:
|
|
||||||
_default: true
|
|
||||||
name:
|
|
||||||
_default: regcred
|
|
||||||
envs:
|
|
||||||
- name: POSTGRES_POOL_SIZE
|
|
||||||
value:
|
|
||||||
_default: "10"
|
|
||||||
- name: API_ADDRESS
|
|
||||||
value:
|
|
||||||
_default: 0.0.0.0:8000
|
|
||||||
podAnnotations:
|
|
||||||
_default:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "4317,4318,9411,8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: attachments
|
|
||||||
vault.hashicorp.com/agent-inject-secret-attachments-db: secrets/data/postgresql/apps/attachments
|
|
||||||
vault.hashicorp.com/agent-inject-template-attachments-db: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/attachments" -}}
|
|
||||||
DATABASE_HOST=postgresql.attachments.svc.cluster.local
|
|
||||||
DATABASE_PORT=5432
|
|
||||||
DATABASE_NAME=attachments_db
|
|
||||||
DATABASE_USER={{ index .Data.data "username" }}
|
|
||||||
DATABASE_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
DATABASE_SSL_MODE=disable
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-attachments-s3: secrets/data/minio/apps/attachments
|
|
||||||
vault.hashicorp.com/agent-inject-template-attachments-s3: |-
|
|
||||||
{{- with secret "secrets/data/minio/apps/attachments" -}}
|
|
||||||
YANDEX_S3_ENDPOINT_URL=minio.minio:9000
|
|
||||||
YANDEX_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
|
||||||
YANDEX_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
|
||||||
YANDEX_S3_USE_SSL=false
|
|
||||||
YANDEX_S3_REGION=ru-central
|
|
||||||
YANDEX_S3_VERIFY=false
|
|
||||||
BUCKET_NAME=attachments
|
|
||||||
{{- end -}}
|
|
||||||
@ -3,5 +3,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: attachments
|
namespace: attachments
|
||||||
resources:
|
resources:
|
||||||
- helmrelease.yaml
|
- ../base
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
patches: []
|
||||||
|
# - path: patch.yaml
|
||||||
|
# target:
|
||||||
|
# kind: HelmRelease
|
||||||
|
# name: attachments
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: srx-admin
|
|
||||||
namespace: control-interface
|
|
||||||
labels:
|
|
||||||
app: srx-admin
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: srx-admin
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: srx-admin
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: srx-admin
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/srx-admin:prod_3b9cb250
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
|
|
||||||
@ -47,7 +47,9 @@ spec:
|
|||||||
|
|
||||||
replicaCount:
|
replicaCount:
|
||||||
_default: 1
|
_default: 1
|
||||||
|
stage: 1
|
||||||
|
preprod: 3
|
||||||
|
production: 3
|
||||||
|
|
||||||
port:
|
port:
|
||||||
_default: 80
|
_default: 80
|
||||||
@ -1,8 +1,6 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: control-interface
|
namespace: django
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- helmrelease.yaml
|
||||||
- deployment.yaml
|
|
||||||
- service.yaml
|
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: control-interface
|
|
||||||
labels:
|
|
||||||
istio-injection: enabled
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: frontend-svc
|
|
||||||
namespace: control-interface
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: srx-admin
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
@ -3,5 +3,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: django
|
namespace: django
|
||||||
resources:
|
resources:
|
||||||
- helmrelease.yaml
|
- ../base
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
patches: []
|
||||||
|
# - path: patch.yaml
|
||||||
|
# target:
|
||||||
|
# kind: HelmRelease
|
||||||
|
# name: srx-admin
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
namespace: django
|
||||||
resources:
|
resources:
|
||||||
- ../base
|
- ../base
|
||||||
patches:
|
patches:
|
||||||
- path: replicas.yaml
|
- path: replicas.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: srx-admin
|
name: srx-admin
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: srx-admin
|
name: srx-admin
|
||||||
namespace: control-interface
|
namespace: django
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
values:
|
||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
deployment:
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user