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

Modify config #1704

Merged
merged 1 commit into from
Jan 13, 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
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"
}
Loading