diff --git a/deploy/helmfile.yaml b/deploy/helmfile.yaml index 60604fae2d0580c5a6f3f197cd4f6728c22b8ae6_ZGVwbG95L2hlbG1maWxlLnlhbWw=..6e2beb8aabf131c145fb6941f8e4d78f2f279259_ZGVwbG95L2hlbG1maWxlLnlhbWw= 100644 --- a/deploy/helmfile.yaml +++ b/deploy/helmfile.yaml @@ -14,8 +14,8 @@ releases: - name: {{ requiredEnv "CI_ENVIRONMENT_NAME" }} - chart: logilab/cubicweb - version: 0.15.0 + chart: logilab/rodolf + version: 0.1.1 atomic: true wait: true timeout: 900 @@ -23,14 +23,3 @@ createNamespace: false values: - values.yaml.gotmpl - - - name: {{ requiredEnv "CI_ENVIRONMENT_NAME" }}-front - chart: logilab/web-app - version: 0.2.1 - atomic: true - wait: true - timeout: 900 - namespace: rodolf - createNamespace: false - values: - - values-front.yaml.gotmpl diff --git a/deploy/values-front.yaml.gotmpl b/deploy/values-front.yaml.gotmpl deleted file mode 100644 index 60604fae2d0580c5a6f3f197cd4f6728c22b8ae6_ZGVwbG95L3ZhbHVlcy1mcm9udC55YW1sLmdvdG1wbA==..0000000000000000000000000000000000000000 --- a/deploy/values-front.yaml.gotmpl +++ /dev/null @@ -1,17 +0,0 @@ -appName: rodolf -host: {{ .StateValues.frontHost }} - -port: 3000 - -image: - repo: {{ requiredEnv "CI_REGISTRY_IMAGE" }}/frontend - tag: {{ .StateValues.deployTag | ternary (requiredEnv "CI_COMMIT_REF_NAME") (requiredEnv "CI_COMMIT_HG_SHORT_SHA") }} - pullPolicy: Always - -env: - RODOLF_API_URL: https://rodolf-api.k.intra.logilab.fr/api - -ingress: - noindex: true - clusterIssuer: false - tlsSecret: false diff --git a/deploy/values.yaml.gotmpl b/deploy/values.yaml.gotmpl index 60604fae2d0580c5a6f3f197cd4f6728c22b8ae6_ZGVwbG95L3ZhbHVlcy55YW1sLmdvdG1wbA==..6e2beb8aabf131c145fb6941f8e4d78f2f279259_ZGVwbG95L3ZhbHVlcy55YW1sLmdvdG1wbA== 100644 --- a/deploy/values.yaml.gotmpl +++ b/deploy/values.yaml.gotmpl @@ -1,7 +1,3 @@ -host: {{ .StateValues.host }} - -image: {{ requiredEnv "CI_REGISTRY_IMAGE" }} -imageTag: {{ .StateValues.deployTag | ternary (requiredEnv "CI_COMMIT_REF_NAME") (requiredEnv "CI_COMMIT_HG_SHORT_SHA") }} - -backupPvcClaimName: backup +cubicweb: + host: {{ .StateValues.host }} @@ -7,8 +3,3 @@ -readinessProbe: - enabled: true - url: /login -livenessProbe: - enabled: true - url: /login + imageTag: {{ .StateValues.deployTag | ternary (requiredEnv "CI_COMMIT_REF_NAME") (requiredEnv "CI_COMMIT_HG_SHORT_SHA") }} @@ -14,4 +5,13 @@ -sessionsInRedis: true -scheduler: true + ingress: + clusterIssuer: null + tls: + withSecret: false + annotations: + nginx.ingress.kubernetes.io/configuration-snippet: | + more_set_headers "Vary: Origin"; + nginx.ingress.kubernetes.io/enable-cors: "false" + nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, OPTIONS" + nginx.ingress.kubernetes.io/cors-allow-headers: "Content-Type, X-Client-Name" + nginx.ingress.kubernetes.io/cors-allow-origin: https://{{ .StateValues.frontHost }} @@ -17,16 +17,9 @@ -ingress: - noindex: true - clusterIssuer: null - enabled: true - tls: - withSecret: false - annotations: - nginx.ingress.kubernetes.io/configuration-snippet: | - more_set_headers "Vary: Origin"; - more_set_headers "Access-Control-Allow-Origin: https://rodolf.k.intra.logilab.fr"; - more_set_headers "Access-Control-Allow-Credentials: true"; - more_set_headers "Access-Control-Allow-Methods: GET,POST,OPTIONS"; - more_set_headers "Access-Control-Allow-Headers: Content-Type, X-Client-Name"; - nginx.ingress.kubernetes.io/enable-cors: "false" + backupBeforeCwUpgrade: {{ .StateValues.backupBeforeCwUpgrade }} + restoreDbWithLatestBackupBeforeHelmRelease: {{ .StateValues.restoreDbWithLatestBackupBeforeHelmRelease }} + backupCronJob: {{ .StateValues.backupCronJob }} + + runDbInitBeforeHelmRelease: {{ .StateValues.runDbInitBeforeHelmRelease }} + resetDbBeforeHelmRelease: {{ .StateValues.resetDbBeforeHelmRelease }} + dropDbAfterDeletingHelmRelease: {{ .StateValues.dropDbAfterDeletingHelmRelease }} @@ -32,21 +25,14 @@ -worker: - enabled: true - args: ["cubicweb-ctl", "rq-worker", "instance"] - resources: - requests: - cpu: 50m - memory: 200Mi - limits: - memory: 200Mi - -# backup -backupBeforeCwUpgrade: {{ .StateValues.backupBeforeCwUpgrade }} -restoreDbWithLatestBackupBeforeHelmRelease: {{ .StateValues.restoreDbWithLatestBackupBeforeHelmRelease }} -backupCronJob: {{ .StateValues.backupCronJob }} - -# database -runDbInitBeforeHelmRelease: true -resetDbBeforeHelmRelease: {{ .StateValues.resetDbBeforeHelmRelease }} -dropDbAfterDeletingHelmRelease: {{ .StateValues.dropDbAfterDeletingHelmRelease }} + env: + AWS_S3_ENDPOINT_URL: https://minio.k.intra.logilab.fr + CW_ACCESS_CONTROL_ALLOW_HEADERS: "*" + CW_ACCESS_CONTROL_ALLOW_METHODS: GET, POST, OPTIONS + CW_ACCESS_CONTROL_ALLOW_ORIGIN: https://{{ .StateValues.frontHost }} + CW_ACCESS_CONTROL_MAX_AGE: "1728000" + CW_DB_HOST: pg.intra.logilab.fr + CW_DB_PORT: 5432 + CW_DB_NAME: rodolf + CW_DB_USER: rodolf + PYRAMID_API_ENABLE_LOGIN_ROUTE: "yes" + RODOLF_S3_BUCKET: rodolf @@ -52,14 +38,8 @@ -env: - AWS_S3_ENDPOINT_URL: https://minio.k.intra.logilab.fr - CW_ACCESS_CONTROL_ALLOW_HEADERS: "*" - CW_ACCESS_CONTROL_ALLOW_METHODS: GET, POST, OPTIONS - CW_ACCESS_CONTROL_ALLOW_ORIGIN: https://rodolf.k.intra.logilab.fr - CW_ACCESS_CONTROL_MAX_AGE: "1728000" - CW_DB_HOST: pg.intra.logilab.fr - CW_DB_PORT: 5432 - CW_DB_NAME: rodolf - CW_DB_USER: rodolf - PYRAMID_API_ENABLE_LOGIN_ROUTE: "yes" - RODOLF_S3_BUCKET: rodolf + secretEnv: + AWS_ACCESS_KEY_ID: {{ .StateValues.s3AccessKeyId }} + AWS_SECRET_ACCESS_KEY: {{ .StateValues.s3AccessKeySecret }} + CW_PASSWORD: {{ .StateValues.cwPassword }} + CW_DB_PASSWORD: {{ .StateValues.cwDbPassword }} + REDIS_SESSIONS_SECRET: {{ .StateValues.redisSessionsSecret }} @@ -65,7 +45,10 @@ -secretEnv: - AWS_ACCESS_KEY_ID: {{ .StateValues.s3AccessKeyId }} - AWS_SECRET_ACCESS_KEY: {{ .StateValues.s3AccessKeySecret }} - CW_PASSWORD: {{ .StateValues.cwPassword }} - CW_DB_PASSWORD: {{ .StateValues.cwDbPassword }} - REDIS_SESSIONS_SECRET: {{ .StateValues.redisSessionsSecret }} +web-app: + host: {{ .StateValues.frontHost }} + + image: + tag: {{ .StateValues.deployTag | ternary (requiredEnv "CI_COMMIT_REF_NAME") (requiredEnv "CI_COMMIT_HG_SHORT_SHA") }} + pullPolicy: Always + + env: + RODOLF_API_URL: https://{{ .StateValues.host }}/api diff --git a/deploy/values_default.yaml b/deploy/values_default.yaml index 60604fae2d0580c5a6f3f197cd4f6728c22b8ae6_ZGVwbG95L3ZhbHVlc19kZWZhdWx0LnlhbWw=..6e2beb8aabf131c145fb6941f8e4d78f2f279259_ZGVwbG95L3ZhbHVlc19kZWZhdWx0LnlhbWw= 100644 --- a/deploy/values_default.yaml +++ b/deploy/values_default.yaml @@ -5,5 +5,6 @@ restoreDbWithLatestBackupBeforeHelmRelease: false backupCronJob: false +runDbInitBeforeHelmRelease: false resetDbBeforeHelmRelease: false dropDbAfterDeletingHelmRelease: false