Skip to content

Commit

Permalink
Merge pull request #1704 from GiganticMinecraft/add_growi_components
Browse files Browse the repository at this point in the history
Modify config
  • Loading branch information
outductor authored Jan 13, 2024
2 parents be0f907 + ee33d17 commit b7695b7
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ spec:
containers:
- name: growi
image: weseek/growi:6
ports:
- containerPort: 3000
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 1
memory: 1Gi
env:
- name: APP_SITE_URL
value: "https://wiki.onp-k8s.admin.seichi.click"
- name: MONGO_URI
value: "mongodb://mongodb:27017/growi"
- name: ELASTICSEARCH_URI
Expand All @@ -35,3 +42,27 @@ spec:
secretKeyRef:
name: growi-secrets
key: passwordSeed
- name: OAUTH_GITHUB_CLIENT_ID
valueFrom:
secretKeyRef:
name: growi-github-sso
key: OAUTH_GITHUB_CLIENT_ID
- name: OAUTH_GITHUB_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: growi-github-sso
key: OAUTH_GITHUB_CLIENT_SECRET
ports:
- containerPort: 3000
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 5
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,35 @@ spec:
containers:
- name: hackmd
image: ghcr.io/giganticminecraft/growi-hackmd:sha-a6d1213
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 1
memory: 1Gi
env:
- name: CMD_CSP_ENABLE
value: "false"
- name: GROWI_URI
value: https://wiki.onp-k8s.admin.seichi.click
# - name: CMD_DB_URL
# valueFrom:
# secretKeyRef:
# name: hackmd-mariadb-url
# key: db-url
ports:
- name: http
containerPort: 3000
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 5
14 changes: 14 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,17 @@ variable "cloudflare_pages__seichi_portal__next_public_ms_app_client_id" {
}

#endregion

#region env variables for Growi

variable "growi_github_sso_client_id" {
description = "GitHub SSO client id for Growi"
type = string
sensitive = true
}

variable "growi_github_sso_client_secret" {
description = "GitHub SSO client id for Growi"
type = string
sensitive = true
}
2 changes: 1 addition & 1 deletion terraform/onp_cluster_namespaces.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ resource "kubernetes_namespace" "minio" {
}
}

resource "kubernetes_namespace" "growi-system" {
resource "kubernetes_namespace" "growi_system" {
metadata {
name = "growi-system"
}
Expand Down
16 changes: 16 additions & 0 deletions terraform/onp_cluster_secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -279,3 +279,19 @@ resource "kubernetes_secret" "idea_reaction_discord_token" {
IDEA_REACTION_DISCORD_TOKEN = var.minecraft__idea_reaction_discord_token
}
}

resource "kubernetes_secret" "growi_github_sso" {
depends_on = [kubernetes_namespace.growi_system]

metadata {
name = "growi-github-sso"
namespace = "growi-system"
}

data = {
"OAUTH_GITHUB_CLIENT_ID" = var.growi_github_sso_client_id
"OAUTH_GITHUB_CLIENT_SECRET" = var.growi_github_sso_client_secret
}

type = "Opaque"
}

0 comments on commit b7695b7

Please sign in to comment.