Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-43699: Deploy templatebot 0.3.0 #3767

Merged
merged 8 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions applications/squarebot/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
SQUAREBOT_GITHUB_APP_ID:
description: >-
The ID of the GitHub App shared by all Squarebot services.
SQUAREBOT_GITHUB_APP_USERNAME:
description: >-
The username slug of the GitHub App shared by all Squarebot services.
SQUAREBOT_GITHUB_APP_PRIVATE_KEY:
description: >-
The private key for the GitHub App shared by all Squarebot services.
Expand Down
2 changes: 1 addition & 1 deletion applications/templatebot/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: "tickets-DM-43699"
appVersion: "0.3.0"
description: Create new projects
name: templatebot
sources:
Expand Down
1 change: 1 addition & 0 deletions applications/templatebot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Create new projects
| config.logLevel | string | `"INFO"` | Logging level |
| config.logProfile | string | `"production"` | Logging profile (`production` for JSON, `development` for human-friendly) |
| config.pathPrefix | string | `"/templatebot"` | URL path prefix |
| config.templateRepoUrl | string | `"https://github.com/lsst/templates"` | URL for the template repository |
| config.topics.slackAppMention | string | `"lsst.square-events.squarebot.slack.app.mention"` | Kafka topic name for the Slack `app_mention` events |
| config.topics.slackBlockActions | string | `"lsst.square-events.squarebot.slack.interaction.block-actions"` | Kafka topic for Slack `block_actions` interaction events |
| config.topics.slackMessageIm | string | `"lsst.square-events.squarebot.slack.message.im"` | Kafka topic name for the Slack `message.im` events (direct message channels) |
Expand Down
12 changes: 12 additions & 0 deletions applications/templatebot/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
TEMPLATEBOT_GITHUB_APP_USERNAME:
description: >-
The username slug for the GitHub App shared by all Squarebot services.
copy:
application: squarebot
key: SQUAREBOT_GITHUB_APP_USERNAME
TEMPLATEBOT_GITHUB_APP_ID:
description: >-
The ID of the GitHub App shared by all Squarebot services.
Expand All @@ -24,3 +30,9 @@ TEMPLATEBOT_SLACK_TOKEN:
copy:
application: squarebot
key: SQUAREBOT_SLACK_TOKEN
TEMPLATEBOT_LTD_USERNAME:
description: >-
The username for the LSST the Docs admin account.
TEMPLATEBOT_LTD_PASSWORD:
description: >-
The password for the LSST the Docs admin account.
1 change: 1 addition & 0 deletions applications/templatebot/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ data:
TEMPLATEBOT_ENVIRONMENT_URL: {{ .Values.global.baseUrl | quote }}
TEMPLATEBOT_PATH_PREFIX: {{ .Values.config.pathPrefix | quote }}
TEMPLATEBOT_PROFILE: {{ .Values.config.logProfile | quote }}
TEMPLATEBOT_TEMPLATE_REPO_URL: {{ .Values.config.templateRepoUrl | quote }}
TEMPLATEBOT_APP_MENTION_TOPIC: {{ .Values.config.topics.slackAppMention | quote }}
TEMPLATEBOT_MESSAGE_IM_TOPIC: {{ .Values.config.topics.slackMessageIm | quote }}
TEMPLATEBOT_BLOCK_ACTIONS_TOPIC: {{ .Values.config.topics.slackBlockActions | quote }}
Expand Down
42 changes: 41 additions & 1 deletion applications/templatebot/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ spec:
- configMapRef:
name: "templatebot"
env:
# Writeable directory for caching template repo checkouts
- name: "TEMPLATEBOT_TEMPLATE_CACHE_DIR"
value: "/tmp/template_repo_cache"
# Writeable directory for concatenating certs. See "tmp" volume.
- name: "KAFKA_CERT_TEMP_DIR"
value: "/tmp/kafka_certs"
Expand Down Expand Up @@ -58,6 +61,31 @@ spec:
secretKeyRef:
name: "templatebot"
key: "TEMPLATEBOT_SLACK_TOKEN"
- name: "TEMPLATEBOT_GITHUB_APP_ID"
valueFrom:
secretKeyRef:
name: "templatebot"
key: "TEMPLATEBOT_GITHUB_APP_ID"
- name: "TEMPLATEBOT_GITHUB_APP_USERNAME"
valueFrom:
secretKeyRef:
name: "templatebot"
key: "TEMPLATEBOT_GITHUB_APP_USERNAME"
- name: "TEMPLATEBOT_GITHUB_APP_PRIVATE_KEY"
valueFrom:
secretKeyRef:
name: "templatebot"
key: "TEMPLATEBOT_GITHUB_APP_PRIVATE_KEY"
- name: "TEMPLATEBOT_LTD_USERNAME"
valueFrom:
secretKeyRef:
name: "templatebot"
key: "TEMPLATEBOT_LTD_USERNAME"
- name: "TEMPLATEBOT_LTD_PASSWORD"
valueFrom:
secretKeyRef:
name: "templatebot"
key: "TEMPLATEBOT_LTD_PASSWORD"
volumeMounts:
- name: "kafka"
mountPath: "/etc/kafkacluster/ca.crt"
Expand All @@ -68,8 +96,14 @@ spec:
- name: "kafka"
mountPath: "/etc/kafkauser/user.key"
subPath: "ssl.keystore.key" # private key for the consuming client
- name: "tmp"
- name: "kafka-certs-tmp"
mountPath: "/tmp/kafka_certs"
- name: "tmp"
mountPath: "/tmp"
- name: "repo-cache"
mountPath: "/tmp/template_repo_cache"
- name: "cookiecutter-replay-dir"
mountPath: "/home/appuser/.cookiecutter_replay/"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
Expand Down Expand Up @@ -109,3 +143,9 @@ spec:
secretName: "templatebot"
- name: "tmp"
emptyDir: {}
- name: "cookiecutter-replay-dir"
emptyDir: {}
- name: "kafka-certs-tmp"
emptyDir: {}
- name: "repo-cache"
emptyDir: {}
3 changes: 3 additions & 0 deletions applications/templatebot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ config:
# -- URL path prefix
pathPrefix: "/templatebot"

# -- URL for the template repository
templateRepoUrl: "https://github.com/lsst/templates"

topics:
# -- Kafka topic name for the Slack `app_mention` events
slackAppMention: "lsst.square-events.squarebot.slack.app.mention"
Expand Down
1 change: 1 addition & 0 deletions environments/values-roundtable-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ applications:
squarebot: true
telegraf: true
telegraf-ds: true
templatebot: true
unfurlbot: true
vault: true
Loading