diff --git a/.woodpecker.yml b/.woodpecker.yml index 2c2aad1..1f79e0b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,26 +1,28 @@ -platform: linux/amd64 - labels: type: exec + platform: linux/amd64 -pipeline: +steps: - name: generate-chart - type: local image: bash commands: - export VERSION=$(sed 's#v##' <<< $CI_COMMIT_TAG) - export IMAGE_TAG=$([ ! -z $CI_COMMIT_TAG ] && echo \"$VERSION\" || echo \"canary\") - - export APP_VERSION=$([ ! -z $CI_COMMIT_TAG ] && echo $VERSION || echo 1.0.0) + - export APP_VERSION=$([ -z $CI_COMMIT_TAG ] && echo $CI_COMMIT_SHA || echo $VERSION) - export CHART_VERSION=$([ -z $CI_COMMIT_TAG ] && echo 1.0.0 || echo $VERSION) - sed -i "s/imageTag:\ \"canary\"/imageTag:\ $IMAGE_TAG/g" charts/$${CI_REPO_NAME}/values.yaml - helm package -u charts/$${CI_REPO_NAME} --version $CHART_VERSION --app-version $APP_VERSION - echo $CONTAINER_PASSWORD | helm registry login $DRYCC_REGISTRY -u $CONTAINER_USERNAME --password-stdin - helm push $${CI_REPO_NAME}-$CHART_VERSION.tgz oci://$DRYCC_REGISTRY/$([ -z $CI_COMMIT_TAG ] && echo charts-testing || echo charts) - secrets: - - dev_registry - - drycc_registry - - container_username - - container_password + environment: + DEV_REGISTRY: + from_secret: dev_registry + DRYCC_REGISTRY: + from_secret: drycc_registry + CONTAINER_USERNAME: + from_secret: container_username + CONTAINER_PASSWORD: + from_secret: container_password when: event: - push diff --git a/charts/gateway/templates/drycc-certificate.yaml b/charts/gateway/templates/certificate.yaml similarity index 93% rename from charts/gateway/templates/drycc-certificate.yaml rename to charts/gateway/templates/certificate.yaml index a1d491a..ca93b38 100644 --- a/charts/gateway/templates/drycc-certificate.yaml +++ b/charts/gateway/templates/certificate.yaml @@ -2,7 +2,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: - name: drycc-certificate + name: drycc-auto-tls spec: dnsNames: {{- range $app := .Values.apps }} diff --git a/charts/gateway/templates/drycc-gateway.yaml b/charts/gateway/templates/gateway.yaml similarity index 94% rename from charts/gateway/templates/drycc-gateway.yaml rename to charts/gateway/templates/gateway.yaml index 1eb0292..1d01e76 100644 --- a/charts/gateway/templates/drycc-gateway.yaml +++ b/charts/gateway/templates/gateway.yaml @@ -7,7 +7,7 @@ metadata: cert-manager.io/issuer: drycc-issuer {{- end }} spec: - gatewayClassName: {{ .Values.global.gatewayClass }} + gatewayClassName: {{ .Values.gatewayClass }} listeners: {{- range $index, $app := .Values.apps }} - name: {{ printf "%s-%v-%d" $app.protocol $app.port $index | lower }} diff --git a/charts/gateway/templates/drycc-issuer-secret.yaml b/charts/gateway/templates/issuer-secret.yaml similarity index 100% rename from charts/gateway/templates/drycc-issuer-secret.yaml rename to charts/gateway/templates/issuer-secret.yaml diff --git a/charts/gateway/templates/drycc-issuer.yaml b/charts/gateway/templates/issuer.yaml similarity index 100% rename from charts/gateway/templates/drycc-issuer.yaml rename to charts/gateway/templates/issuer.yaml diff --git a/charts/gateway/templates/drycc-route.yaml b/charts/gateway/templates/route.yaml similarity index 100% rename from charts/gateway/templates/drycc-route.yaml rename to charts/gateway/templates/route.yaml diff --git a/charts/gateway/values.yaml b/charts/gateway/values.yaml index 5a8f9e8..55761d1 100644 --- a/charts/gateway/values.yaml +++ b/charts/gateway/values.yaml @@ -1,3 +1,7 @@ + +# GatewayClass is cluster-scoped resource defined by the infrastructure provider. +gatewayClass: "" + # acme configuration takes effect if and only if certManagerEnabled is true acme: server: https://acme-v02.api.letsencrypt.org/directory @@ -20,13 +24,13 @@ apps: services: - name: drycc-controller-api port: 80 - - name: drycc-rabbitmq + - name: drycc-grafana port: 80 - hostname: drycc-rabbitmq.{{ .Values.global.platformDomain }} + hostname: drycc-grafana.{{ .Values.global.platformDomain }} protocol: HTTP services: - - name: drycc-rabbitmq - port: 15672 + - name: drycc-grafana + port: 80 - name: drycc-passport port: 80 hostname: drycc-passport.{{ .Values.global.platformDomain }} @@ -34,25 +38,24 @@ apps: services: - name: drycc-passport port: 80 - - name: drycc-prometheus + - name: drycc-storage port: 80 - hostname: drycc-prometheus.{{ .Values.global.platformDomain }} + hostname: drycc-storage.{{ .Values.global.platformDomain }} protocol: HTTP services: - - name: drycc-prometheus - port: 9090 - - name: drycc-monitor-grafana + - name: drycc-storage + port: 9000 + - name: drycc-storage-console port: 80 - hostname: drycc-monitor-grafana.{{ .Values.global.platformDomain }} + hostname: drycc-storage-console.{{ .Values.global.platformDomain }} protocol: HTTP services: - - name: drycc-monitor-grafana - port: 80 + - name: drycc-storage + port: 9001 global: # Admin email, used for each component to send email to administrator email: "drycc@drycc.cc" - gatewayClass: "" # The publicly resolvable hostname to build your cluster with. # # This will be the hostname that is used to build endpoints such as "drycc.$HOSTNAME"