diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1dd7425378f2f9c30bf10f9787bb15bb90623c01..d4a88b5b4cfad0a7974af8a2ec6ce5769c31abdc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,8 @@ workflow: - if: $CI_COMMIT_BRANCH == "master" variables: APP_URL: https://maps.metager.de + APP_HOST: maps.metager.de + HELM_VALUES_FILE: .gitlab/master.yaml ENVIRONMENT: production IMAGE_NAME: $CI_REGISTRY_IMAGE IMAGE_TAG: $IMAGE_TAG_PREFIX-$CI_COMMIT_SHA @@ -98,4 +100,4 @@ deploy: - kubectl config use-context $CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:maps-deployment script: - kubectl -n $KUBE_NAMESPACE create secret generic $DEPLOYMENT_CHART_NAME --from-file=.env=$ENV_PRODUCTION --dry-run=client --save-config -o yaml | kubectl apply -f - - - helm -n $KUBE_NAMESPACE upgrade --install $DEPLOYMENT_CHART_NAME maps/ --set nginx.image.repository=$CI_REGISTRY_IMAGE/nginx --set secretName=$DEPLOYMENT_CHART_NAME --set nginx.image.tag=$IMAGE_TAG --set fpm.image.repository=$CI_REGISTRY_IMAGE/fpm --set fpm.image.tag=$IMAGE_TAG + - helm -n $KUBE_NAMESPACE upgrade --install $DEPLOYMENT_CHART_NAME maps/ -f $HELM_VALUES_FILE --set nginx.image.repository=$CI_REGISTRY_IMAGE/nginx --set secretName=$DEPLOYMENT_CHART_NAME --set nginx.image.tag=$IMAGE_TAG --set fpm.image.repository=$CI_REGISTRY_IMAGE/fpm --set fpm.image.tag=$IMAGE_TAG diff --git a/.gitlab/master.yaml b/.gitlab/master.yaml new file mode 100644 index 0000000000000000000000000000000000000000..bbb7bc0a952f7912c9a6517da4a78807d4fc9953 --- /dev/null +++ b/.gitlab/master.yaml @@ -0,0 +1,10 @@ +ingress: + hosts: + - host: maps.metager.de + paths: + - path: / + pathType: ImplementationSpecific + tls: + - hosts: + - maps.metager.de + secretName: maps-tls \ No newline at end of file diff --git a/maps/values.yaml b/maps/values.yaml index 62f4f24c256fa444563c10e069b33b4d523ffbf2..43805d1a37eb5711763f95f44423d25ef645beb5 100644 --- a/maps/values.yaml +++ b/maps/values.yaml @@ -38,20 +38,14 @@ service: port: 80 ingress: - enabled: false - className: "" - annotations: {} + enabled: true + className: nginx + annotations: + cert-manager.io/cluster-issuer: letsencrypt-dns # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific + hosts: [] tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local resources: {} # We usually recommend not to specify default resources and to leave this as a conscious