[ci skip] Move Terraform modules into stack directories
Move all 88 service modules (66 individual + 22 platform) from modules/kubernetes/<service>/ into their corresponding stack directories: - Service stacks: stacks/<service>/module/ - Platform stack: stacks/platform/modules/<service>/ This collocates module source code with its Terragrunt definition. Only shared utility modules remain in modules/kubernetes/: ingress_factory, setup_tls_secret, dockerhub_secret, oauth-proxy. All cross-references to shared modules updated to use correct relative paths. Verified with terragrunt run --all -- plan: 0 adds, 0 destroys across all 68 stacks.
This commit is contained in:
parent
73cb696f12
commit
e225e81ebf
614 changed files with 12075 additions and 352 deletions
30
stacks/homepage/module/main.tf
Normal file
30
stacks/homepage/module/main.tf
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
variable "tls_secret_name" {}
|
||||
variable "tier" { type = string }
|
||||
|
||||
module "tls_secret" {
|
||||
source = "../../../modules/kubernetes/setup_tls_secret"
|
||||
namespace = kubernetes_namespace.homepage.metadata[0].name
|
||||
tls_secret_name = var.tls_secret_name
|
||||
}
|
||||
|
||||
resource "kubernetes_namespace" "homepage" {
|
||||
metadata {
|
||||
name = "homepage"
|
||||
labels = {
|
||||
"istio-injection" : "disabled"
|
||||
tier = var.tier
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "helm_release" "homepage" {
|
||||
namespace = kubernetes_namespace.homepage.metadata[0].name
|
||||
create_namespace = false
|
||||
name = "homepage"
|
||||
atomic = true
|
||||
|
||||
repository = "http://jameswynn.github.io/helm-charts"
|
||||
chart = "homepage"
|
||||
|
||||
values = [templatefile("${path.module}/values.yaml", { tls_secret_name = var.tls_secret_name })]
|
||||
}
|
||||
155
stacks/homepage/module/values.yaml
Normal file
155
stacks/homepage/module/values.yaml
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
image:
|
||||
repository: ghcr.io/gethomepage/homepage
|
||||
tag: v1.8.0
|
||||
|
||||
# Enable RBAC. RBAC is necessary to use Kubernetes integration
|
||||
enableRbac: true
|
||||
|
||||
extraClusterRoles:
|
||||
# - apiGroups:
|
||||
# - some-group
|
||||
# resources:
|
||||
# - some-resource
|
||||
# verbs:
|
||||
# - get
|
||||
|
||||
serviceAccount:
|
||||
# Specify a different service account name. When blank it will default to the release
|
||||
# name if *create* is enabled, otherwise it will refer to the default service account.
|
||||
name: ""
|
||||
# Create service account. Needed when RBAC is enabled.
|
||||
create: false
|
||||
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: 3000
|
||||
|
||||
controller:
|
||||
strategy: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
|
||||
# Enable the ingress to expose Homepage to the network.
|
||||
ingress:
|
||||
main:
|
||||
enabled: true
|
||||
labels:
|
||||
# This label will enable discover of this deployment in Homepage
|
||||
gethomepage.dev/enabled: "true"
|
||||
annotations:
|
||||
# These annotations will configure how this deployment is shown in Homepage
|
||||
gethomepage.dev/name: "Homepage"
|
||||
gethomepage.dev/description: "A modern, secure, highly customizable application dashboard."
|
||||
gethomepage.dev/group: "A New Group"
|
||||
gethomepage.dev/icon: "homepage.png"
|
||||
ingressClassName: "traefik"
|
||||
hosts:
|
||||
- host: &host "home.viktorbarzin.me"
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- hosts:
|
||||
- *host
|
||||
secretName: ${tls_secret_name}
|
||||
|
||||
# All the config files for Homepage can be specified under their relevant config block.
|
||||
config:
|
||||
# To use an existing ConfigMap uncomment this line and specify the name
|
||||
# useExistingConfigMap: existing-homepage-configmap
|
||||
bookmarks:
|
||||
- Developer:
|
||||
- Github:
|
||||
- abbr: Viktor Barzin
|
||||
href: https://github.com/viktorbarzin
|
||||
services:
|
||||
# - My First Group:
|
||||
# - My First Service:
|
||||
# href: http://localhost/
|
||||
# description: Homepage is awesome
|
||||
|
||||
# - My Second Group:
|
||||
# - My Second Service:
|
||||
# href: http://localhost/
|
||||
# description: Homepage is the best
|
||||
|
||||
# - My Third Group:
|
||||
# - My Third Service:
|
||||
# href: http://localhost/
|
||||
# description: Homepage is 😎
|
||||
widgets:
|
||||
- resources:
|
||||
# change backend to 'kubernetes' to use Kubernetes integration. Requires RBAC.
|
||||
# backend: resources
|
||||
backend: kubernetes
|
||||
expanded: true
|
||||
cpu: true
|
||||
memory: true
|
||||
- search:
|
||||
provider: duckduckgo
|
||||
target: _blank
|
||||
## Uncomment to enable Kubernetes integration
|
||||
- kubernetes:
|
||||
cluster:
|
||||
show: true
|
||||
cpu: true
|
||||
memory: true
|
||||
showLabel: true
|
||||
label: "cluster"
|
||||
nodes:
|
||||
show: true
|
||||
cpu: true
|
||||
memory: true
|
||||
showLabel: true
|
||||
kubernetes:
|
||||
# change mode to 'cluster' to use RBAC service account
|
||||
# mode: disable
|
||||
mode: cluster
|
||||
docker:
|
||||
settings:
|
||||
|
||||
# -- Main environment variables. Template enabled.
|
||||
# Syntax options:
|
||||
# A) TZ: UTC
|
||||
# B) PASSWD: '{{ .Release.Name }}'
|
||||
# C) PASSWD:
|
||||
# configMapKeyRef:
|
||||
# name: config-map-name
|
||||
# key: key-name
|
||||
# D) PASSWD:
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: secret-name
|
||||
# key: key-name
|
||||
# ...
|
||||
# E) - name: TZ
|
||||
# value: UTC
|
||||
# F) - name: TZ
|
||||
# value: '{{ .Release.Name }}'
|
||||
env:
|
||||
HOMEPAGE_ALLOWED_HOSTS: home.viktorbarzin.me
|
||||
|
||||
|
||||
# To include environment variables from other configs or other secrets for use in
|
||||
# Homepage's variable substitutions. Refer to them here.
|
||||
# envFrom:
|
||||
# - secretRef:
|
||||
# name: my-secret
|
||||
# - configMapRef:
|
||||
# name: my-configmap
|
||||
|
||||
persistence:
|
||||
logs:
|
||||
enabled: true
|
||||
type: emptyDir
|
||||
mountPath: /app/config/logs
|
||||
# resources:
|
||||
# requests:
|
||||
# memory: 10Mi
|
||||
# cpu: 10m
|
||||
# limits:
|
||||
# memory: 200Mi
|
||||
# cpu: 500m
|
||||
Loading…
Add table
Add a link
Reference in a new issue