Skip to content

Commit

Permalink
Merge pull request #1968 from GiganticMinecraft/fix/event-source-defi…
Browse files Browse the repository at this point in the history
…nition

fix: event-sourceの定義の不足分を追加
  • Loading branch information
outductor authored May 20, 2024
2 parents f9d2210 + 009b3f0 commit 03ff5d1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ spec:
webhook:
endpoint: /create-seichiassist-release
port: "12000"
method: POST
url: https://argo-wf-webhook.onp-k8s.admin.seichi.click
events:
- "release"
apiToken:
name: argo-events-github-access-token
key: ARGO_EVENTS_GITHUB_ACCESS_TOKEN
10 changes: 10 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,13 @@ variable "hackmd_mariadb_hackmd_db_url" {
}

#endregion

# region env variables for ArgoEvents

variable "argo_events_github_access_token" {
description = "ArgoEvents GitHub access token"
type = string
sensitive = true
}

# endregion
16 changes: 16 additions & 0 deletions terraform/onp_cluster_minecraft_secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,22 @@ resource "kubernetes_secret" "onp_minecraft_prod_kagawa_secrets" {
type = "Opaque"
}

resource "kubernetes_secret" "argo_events_github_access_token" {
depends_on = [kubernetes_namespace.onp_seichi_minecraft]

metadata {
name = "argo-events-github-access-token"
namespace = "seichi-minecraft"
}

data = {
# ref: https://github.com/argoproj/argo-events/blob/4636435578ae2396fa637e4ed44c2d2edbbec58b/examples/event-sources/github.yaml#L54
ARGO_EVENTS_GITHUB_ACCESS_TOKEN = base64encode(var.argo_events_github_access_token)
}

type = "Opaque"
}

resource "random_password" "minecraft__prod_mariadb_root_password" {
length = 16
special = true
Expand Down

0 comments on commit 03ff5d1

Please sign in to comment.