diff --git a/helm/Chart.yaml b/helm/Chart.yaml new file mode 100644 index 0000000..9affd2f --- /dev/null +++ b/helm/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +name: substrate-tip-bot +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.0.0" +dependencies: +- name: common + version: "0.7.2" + repository: "https://paritytech.github.io/helm-charts/" \ No newline at end of file diff --git a/helm/values-parity-prod.yaml b/helm/values-parity-prod.yaml new file mode 100644 index 0000000..59585f8 --- /dev/null +++ b/helm/values-parity-prod.yaml @@ -0,0 +1,33 @@ +common: + env: + APP_HOST: "https://substrate-tip-bot.parity-prod.parity.io" + APPROVERS_GH_ORG: "paritytech" + APPROVERS_GH_TEAM: "tip-bot-approvers" + POLKASSEMBLY_ENDPOINT: "https://api.polkassembly.io/api/v1/" + MATRIX_SERVER_URL: "https://m.parity.io" + MATRIX_ROOM_ID: "!tQFMxBymnjGQYNwlzM:parity.io" # ENG: Engineering Automation -> tip-bot + secrets: + # WEBHOOK_SECRET is used internally by probot: https://probot.github.io/docs/configuration/ + WEBHOOK_SECRET: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#WEBHOOK_SECRET + PRIVATE_KEY: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#PRIVATE_KEY + ACCOUNT_SEED: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#ACCOUNT_SEED + APP_ID: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#APP_ID + MATRIX_ACCESS_TOKEN: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-prod#MATRIX_ACCESS_TOKEN + ingress: + annotations: + external-dns.alpha.kubernetes.io/target: traefik-external.parity-prod.parity.io. + rules: + - host: substrate-tip-bot.parity-prod.parity.io + http: + paths: + - path: / + pathType: ImplementationSpecific + backend: + service: + name: substrate-tip-bot + port: + name: http + tls: + - hosts: + - substrate-tip-bot.parity-prod.parity.io + secretName: substrate-tip-bot.parity-prod.parity.io \ No newline at end of file diff --git a/helm/values-parity-stg.yaml b/helm/values-parity-stg.yaml new file mode 100644 index 0000000..d2663ad --- /dev/null +++ b/helm/values-parity-stg.yaml @@ -0,0 +1,33 @@ +common: + env: + APP_HOST: "https://substrate-tip-bot.parity-stg.parity.io" + APPROVERS_GH_ORG: "paritytech-stg" + APPROVERS_GH_TEAM: "tip-bot-approvers" + POLKASSEMBLY_ENDPOINT: "https://test.polkassembly.io/api/v1/" + MATRIX_SERVER_URL: "https://m.parity.io" + MATRIX_ROOM_ID: "!KiTmXyGkdiLNzrzMgj:parity.io" # ENG: Engineering Automation -> Bot Test Farm + secrets: + # WEBHOOK_SECRET is used internally by probot: https://probot.github.io/docs/configuration/ + WEBHOOK_SECRET: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#WEBHOOK_SECRET + PRIVATE_KEY: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#PRIVATE_KEY + ACCOUNT_SEED: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#ACCOUNT_SEED + APP_ID: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#APP_ID + MATRIX_ACCESS_TOKEN: ref+vault://kv/argo-cd/substrate-tip-bot/opstooling-parity-stg#MATRIX_ACCESS_TOKEN + ingress: + annotations: + external-dns.alpha.kubernetes.io/target: traefik-external.parity-stg.parity.io. + rules: + - host: substrate-tip-bot.parity-stg.parity.io + http: + paths: + - path: / + pathType: ImplementationSpecific + backend: + service: + name: substrate-tip-bot + port: + name: http + tls: + - hosts: + - substrate-tip-bot.parity-stg.parity.io + secretName: substrate-tip-bot.parity-stg.parity.io \ No newline at end of file diff --git a/helm/values.yaml b/helm/values.yaml new file mode 100644 index 0000000..d848345 --- /dev/null +++ b/helm/values.yaml @@ -0,0 +1,48 @@ +common: + fullnameOverride: "substrate-tip-bot" + extraLabels: + team: "opstooling" + serviceAccount: + create: false + image: + # tag is set in ci https://github.com/paritytech/substrate-tip-bot/blob/72a5a0228c0405e211f6ff768cfd4010b3323658/.gitlab-ci.yml#L152 + repository: paritytech/substrate-tip-bot + envFrom: + - secretRef: + name: substrate-tip-bot + service: + ports: + - name: http + protocol: TCP + port: 80 + targetPort: 3000 + ingress: + enabled: true + annotations: + cert-manager.io/cluster-issuer: letsencrypt-dns01 + kubernetes.io/ingress.class: traefik-external + traefik.ingress.kubernetes.io/router.entrypoints: web,websecure + traefik.ingress.kubernetes.io/router.tls: "true" + livenessProbe: + httpGet: + path: /tip-bot/health + port: http + initialDelaySeconds: 60 + periodSeconds: 5 + readinessProbe: + httpGet: + path: /tip-bot/health + port: http + initialDelaySeconds: 60 + periodSeconds: 5 + serviceMonitor: + enabled: true + endpoints: + - port: http + path: /tip-bot/metrics + interval: 1m + scheme: http + scrapeTimeout: 30s + honorLabels: true + targetLabels: + - team \ No newline at end of file