Compare commits
31 Commits
a809e1c97f
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 36d7afbb65 | |||
| c33dcdc447 | |||
| be9bd96cf3 | |||
| bb5f6922fa | |||
| 346cf9fa43 | |||
| 1288057b81 | |||
| 3876fa818d | |||
| a548bf1cb1 | |||
| 93ba86baf3 | |||
| 098830c10b | |||
| 9cbac6d3ef | |||
| 73aaaaeb99 | |||
| 7c60a5fd53 | |||
| 27f12f183e | |||
| c61434b692 | |||
| 172ceac2fc | |||
| 48a4fd0dd1 | |||
| 4dc09547ef | |||
| 546a9efe44 | |||
| 679cec4bc1 | |||
| 71789f9f32 | |||
| 4cbcec58d3 | |||
| 9c93e185f8 | |||
| d6c8474bd3 | |||
| 42351000ee | |||
| f7d1330c37 | |||
| d9e07e432e | |||
| 14a258de7d | |||
| be8bcc3743 | |||
| dc257b1bcd | |||
| 66119e5207 |
@@ -0,0 +1,23 @@
|
|||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: apply
|
||||||
|
image: git.unkin.net/unkin/almalinux9-opentofu:20260606
|
||||||
|
environment:
|
||||||
|
VAULT_AUTH_METHOD: kubernetes
|
||||||
|
commands:
|
||||||
|
- dnf install vault -y
|
||||||
|
- make plan
|
||||||
|
- make apply
|
||||||
|
backend_options:
|
||||||
|
kubernetes:
|
||||||
|
serviceAccountName: terraform-vault
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 1
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
cpu: 2
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
when:
|
||||||
|
- event: pull_request
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: plan
|
||||||
|
image: git.unkin.net/unkin/almalinux9-opentofu:20260606
|
||||||
|
environment:
|
||||||
|
VAULT_AUTH_METHOD: kubernetes
|
||||||
|
commands:
|
||||||
|
- dnf install vault -y
|
||||||
|
- make plan
|
||||||
|
backend_options:
|
||||||
|
kubernetes:
|
||||||
|
serviceAccountName: terraform-vault
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 1
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
cpu: 2
|
||||||
@@ -3,7 +3,16 @@ when:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: pre-commit
|
- name: pre-commit
|
||||||
image: git.unkin.net/unkin/almalinux9-base:latest
|
image: git.unkin.net/unkin/almalinux9-opentofu:20260606
|
||||||
commands:
|
commands:
|
||||||
- dnf install uv opentofu terragrunt tflint -y
|
|
||||||
- uvx pre-commit run --all-files
|
- uvx pre-commit run --all-files
|
||||||
|
backend_options:
|
||||||
|
kubernetes:
|
||||||
|
serviceAccountName: default
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 512Mi
|
||||||
|
cpu: 1
|
||||||
|
limits:
|
||||||
|
memory: 2Gi
|
||||||
|
cpu: 2
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
.PHONY: init plan apply format
|
.PHONY: init plan apply format
|
||||||
|
|
||||||
|
VAULT_AUTH_METHOD ?= approle
|
||||||
|
VAULT_K8S_ROLE ?= woodpecker_terraform_vault
|
||||||
|
VAULT_K8S_MOUNT ?= auth/k8s/au/syd1
|
||||||
|
VAULT_K8S_JWT_PATH ?= /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||||
|
|
||||||
# Define vault_env function to set up vault environment
|
# Define vault_env function to set up vault environment
|
||||||
define vault_env
|
define vault_env
|
||||||
@export VAULT_ADDR="https://vault.service.consul:8200" && \
|
@export VAULT_ADDR="https://vault.service.consul:8200" && \
|
||||||
export VAULT_TOKEN=$$(vault write -field=token auth/approle/login role_id=$$VAULT_ROLEID) && \
|
if [ "$(VAULT_AUTH_METHOD)" = "kubernetes" ]; then \
|
||||||
export CONSUL_HTTP_TOKEN=$$(vault read -format=json consul_root/au/syd1/creds/terraform-vault | jq '.data.token')
|
export VAULT_TOKEN=$$(vault write -field=token $(VAULT_K8S_MOUNT)/login role=$(VAULT_K8S_ROLE) jwt=$$(cat $(VAULT_K8S_JWT_PATH))); \
|
||||||
|
else \
|
||||||
|
export VAULT_TOKEN=$$(vault write -field=token auth/approle/login role_id=$$VAULT_ROLEID); \
|
||||||
|
fi && \
|
||||||
|
export CONSUL_HTTP_TOKEN=$$(vault read -field=token consul_root/au/syd1/creds/terraform-vault)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
init:
|
init:
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
token_ttl: 120
|
||||||
|
token_max_ttl: 120
|
||||||
|
bind_secret_id: false
|
||||||
|
token_bound_cidrs:
|
||||||
|
- "10.10.12.200/32"
|
||||||
|
- "198.18.25.102/32"
|
||||||
|
- "198.18.26.91/32"
|
||||||
|
- "198.18.27.40/32"
|
||||||
|
use_deterministic_role_id: true
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
token_ttl: 120
|
||||||
|
token_max_ttl: 120
|
||||||
|
bind_secret_id: false
|
||||||
|
token_bound_cidrs:
|
||||||
|
- "10.10.12.200/32"
|
||||||
|
- "198.18.25.102/32"
|
||||||
|
- "198.18.26.91/32"
|
||||||
|
- "198.18.27.40/32"
|
||||||
|
use_deterministic_role_id: true
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
token_ttl: 120
|
||||||
|
token_max_ttl: 120
|
||||||
|
bind_secret_id: false
|
||||||
|
token_bound_cidrs:
|
||||||
|
- "10.10.12.200/32"
|
||||||
|
- "198.18.25.102/32"
|
||||||
|
- "198.18.26.91/32"
|
||||||
|
- "198.18.27.40/32"
|
||||||
|
use_deterministic_role_id: true
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
token_ttl: 120
|
||||||
|
token_max_ttl: 120
|
||||||
|
bind_secret_id: false
|
||||||
|
token_bound_cidrs:
|
||||||
|
- "10.10.12.200/32"
|
||||||
|
- "198.18.25.102/32"
|
||||||
|
- "198.18.26.91/32"
|
||||||
|
- "198.18.27.40/32"
|
||||||
|
use_deterministic_role_id: true
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
token_ttl: 120
|
||||||
|
token_max_ttl: 120
|
||||||
|
bind_secret_id: false
|
||||||
|
token_bound_cidrs:
|
||||||
|
- "10.10.12.200/32"
|
||||||
|
- "198.18.25.102/32"
|
||||||
|
- "198.18.26.91/32"
|
||||||
|
- "198.18.27.40/32"
|
||||||
|
use_deterministic_role_id: true
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
token_ttl: 120
|
||||||
|
token_max_ttl: 120
|
||||||
|
bind_secret_id: false
|
||||||
|
token_bound_cidrs:
|
||||||
|
- "10.10.12.200/32"
|
||||||
|
- "198.18.25.102/32"
|
||||||
|
- "198.18.26.91/32"
|
||||||
|
- "198.18.27.40/32"
|
||||||
|
use_deterministic_role_id: true
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- default
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- artifactapi
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: vault
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- default
|
||||||
|
bound_service_account_namespaces: ['*']
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: vault
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# rpmbuilder is deployed in woodpeckerci
|
||||||
|
bound_service_account_names:
|
||||||
|
- default
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- woodpecker
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: https://kubernetes.default.svc.cluster.local
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- terraform-artifactapi
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- woodpecker
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: https://kubernetes.default.svc.cluster.local
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- terraform-authentik
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- woodpecker
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: https://kubernetes.default.svc.cluster.local
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- terraform-git
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- woodpecker
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: https://kubernetes.default.svc.cluster.local
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- terraform-prowlarr
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- woodpecker
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: https://kubernetes.default.svc.cluster.local
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- terraform-radarr
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- woodpecker
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: https://kubernetes.default.svc.cluster.local
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- terraform-sonarr
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- woodpecker
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: https://kubernetes.default.svc.cluster.local
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
bound_service_account_names:
|
||||||
|
- terraform-vault
|
||||||
|
bound_service_account_namespaces:
|
||||||
|
- woodpecker
|
||||||
|
token_ttl: 600
|
||||||
|
token_max_ttl: 600
|
||||||
|
audience: https://kubernetes.default.svc.cluster.local
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
consul_roles:
|
||||||
|
- terraform-artifactapi
|
||||||
|
ttl: 120
|
||||||
|
max_ttl: 300
|
||||||
|
datacenters: []
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
consul_roles:
|
||||||
|
- terraform-authentik
|
||||||
|
ttl: 120
|
||||||
|
max_ttl: 300
|
||||||
|
datacenters: []
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
consul_roles:
|
||||||
|
- terraform-git
|
||||||
|
ttl: 120
|
||||||
|
max_ttl: 300
|
||||||
|
datacenters: []
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
consul_roles:
|
||||||
|
- terraform-prowlarr
|
||||||
|
ttl: 120
|
||||||
|
max_ttl: 300
|
||||||
|
datacenters: []
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
consul_roles:
|
||||||
|
- terraform-radarr
|
||||||
|
ttl: 120
|
||||||
|
max_ttl: 300
|
||||||
|
datacenters: []
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
consul_roles:
|
||||||
|
- terraform-sonarr
|
||||||
|
ttl: 120
|
||||||
|
max_ttl: 300
|
||||||
|
datacenters: []
|
||||||
@@ -263,12 +263,11 @@ module "consul_secret_backend_role" {
|
|||||||
|
|
||||||
for_each = var.consul_secret_backend_role
|
for_each = var.consul_secret_backend_role
|
||||||
|
|
||||||
name = each.value.name
|
name = each.value.name
|
||||||
backend = each.value.backend
|
backend = each.value.backend
|
||||||
consul_roles = each.value.consul_roles
|
ttl = each.value.ttl
|
||||||
ttl = each.value.ttl
|
max_ttl = each.value.max_ttl
|
||||||
max_ttl = each.value.max_ttl
|
local = each.value.local
|
||||||
local = each.value.local
|
|
||||||
|
|
||||||
depends_on = [module.consul_secret_backend, module.consul_acl_management]
|
depends_on = [module.consul_secret_backend, module.consul_acl_management]
|
||||||
}
|
}
|
||||||
@@ -321,7 +320,6 @@ module "pki_mount_only" {
|
|||||||
path = each.key
|
path = each.key
|
||||||
description = each.value.description
|
description = each.value.description
|
||||||
max_lease_ttl_seconds = each.value.max_lease_ttl_seconds
|
max_lease_ttl_seconds = each.value.max_lease_ttl_seconds
|
||||||
issuer_ref = each.value.issuer_ref
|
|
||||||
issuing_certificates = each.value.issuing_certificates
|
issuing_certificates = each.value.issuing_certificates
|
||||||
crl_distribution_points = each.value.crl_distribution_points
|
crl_distribution_points = each.value.crl_distribution_points
|
||||||
ocsp_servers = each.value.ocsp_servers
|
ocsp_servers = each.value.ocsp_servers
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ variable "name" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
variable "consul_roles" {
|
|
||||||
description = "List of Consul roles to attach to tokens"
|
|
||||||
type = list(string)
|
|
||||||
default = []
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
variable "ttl" {
|
variable "ttl" {
|
||||||
description = "TTL for generated tokens"
|
description = "TTL for generated tokens"
|
||||||
|
|||||||
@@ -13,11 +13,6 @@ variable "max_lease_ttl_seconds" {
|
|||||||
type = number
|
type = number
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "issuer_ref" {
|
|
||||||
description = "Reference to the PKI issuer (default, or issuer ID/name)"
|
|
||||||
type = string
|
|
||||||
default = "default"
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "issuing_certificates" {
|
variable "issuing_certificates" {
|
||||||
description = "List of URLs for issuing certificates"
|
description = "List of URLs for issuing certificates"
|
||||||
|
|||||||
@@ -203,7 +203,6 @@ variable "pki_mount_only" {
|
|||||||
type = map(object({
|
type = map(object({
|
||||||
description = optional(string)
|
description = optional(string)
|
||||||
max_lease_ttl_seconds = optional(number, 315360000)
|
max_lease_ttl_seconds = optional(number, 315360000)
|
||||||
issuer_ref = optional(string, "default")
|
|
||||||
issuing_certificates = optional(list(string), [])
|
issuing_certificates = optional(list(string), [])
|
||||||
crl_distribution_points = optional(list(string), [])
|
crl_distribution_points = optional(list(string), [])
|
||||||
ocsp_servers = optional(list(string), [])
|
ocsp_servers = optional(list(string), [])
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -21,3 +21,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -15,3 +15,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -14,3 +14,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "consul_root/au/syd1/creds/terraform-artifactapi"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_artifactapi
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_artifactapi
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "consul_root/au/syd1/creds/terraform-authentik"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_authentik
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_authentik
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "consul_root/au/syd1/creds/terraform-git"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_git
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_git
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "consul_root/au/syd1/creds/terraform-prowlarr"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_prowlarr
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_prowlarr
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "consul_root/au/syd1/creds/terraform-radarr"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_radarr
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_radarr
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "consul_root/au/syd1/creds/terraform-sonarr"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_sonarr
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_sonarr
|
||||||
@@ -8,3 +8,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -15,3 +15,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Templated access to kv secrets for kubernetes
|
||||||
|
#
|
||||||
|
# kv/kubernetes/namespace/<namespace>/<service_account>
|
||||||
|
# kv/kubernetes/cluster/<cluster>/<namespace>/<service_account>
|
||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "kv/data/kubernetes/namespace/{{identity.entity.aliases.auth_kubernetes_ac24966b.metadata.service_account_namespace}}/{{identity.entity.aliases.auth_kubernetes_ac24966b.metadata.service_account_name}}/*"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
- path: "kv/data/kubernetes/cluster/au/syd1/{{identity.entity.aliases.auth_kubernetes_ac24966b.metadata.service_account_namespace}}/{{identity.entity.aliases.auth_kubernetes_ac24966b.metadata.service_account_name}}/*"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
k8s/au/syd1:
|
||||||
|
- default
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Allow reading environment variables for artifactapi
|
||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "kv/data/service/artifactapi/environment"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
k8s/au/syd1:
|
||||||
|
- artifactapi
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Allow reading environment vars for postgres/artifactapi
|
||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "kv/data/service/artifactapi/postgres-password"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
k8s/au/syd1:
|
||||||
|
- artifactapi
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# Allow reading Gitea admin token
|
||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "kv/data/service/gitea/gitadmin/tokens/terraform-git"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_git
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_git
|
||||||
@@ -8,3 +8,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- rpmbuilder
|
- rpmbuilder
|
||||||
|
k8s/au/syd1:
|
||||||
|
- rpmbuilder
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- rpmbuilder
|
- rpmbuilder
|
||||||
|
k8s/au/syd1:
|
||||||
|
- rpmbuilder
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -8,3 +8,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -6,5 +6,8 @@ rules:
|
|||||||
- read
|
- read
|
||||||
|
|
||||||
auth:
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_prowlarr
|
||||||
k8s/au/syd1:
|
k8s/au/syd1:
|
||||||
- media-apps
|
- media-apps
|
||||||
|
- woodpecker_terraform_prowlarr
|
||||||
|
|||||||
@@ -6,5 +6,8 @@ rules:
|
|||||||
- read
|
- read
|
||||||
|
|
||||||
auth:
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_radarr
|
||||||
k8s/au/syd1:
|
k8s/au/syd1:
|
||||||
- media-apps
|
- media-apps
|
||||||
|
- woodpecker_terraform_radarr
|
||||||
|
|||||||
@@ -6,5 +6,8 @@ rules:
|
|||||||
- read
|
- read
|
||||||
|
|
||||||
auth:
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_sonarr
|
||||||
k8s/au/syd1:
|
k8s/au/syd1:
|
||||||
- media-apps
|
- media-apps
|
||||||
|
- woodpecker_terraform_sonarr
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "kv/data/service/woodpecker/tokens/gitadmin"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
approle:
|
||||||
|
- terraform_git
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_git
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Allow reading woodpecker agent secret for auto joining more agents
|
||||||
|
---
|
||||||
|
rules:
|
||||||
|
- path: "kv/data/service/woodpecker/woodpecker-agent-secret"
|
||||||
|
capabilities:
|
||||||
|
- read
|
||||||
|
|
||||||
|
auth:
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker
|
||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -9,3 +9,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -20,3 +20,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -16,3 +16,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -16,3 +16,5 @@ rules:
|
|||||||
auth:
|
auth:
|
||||||
approle:
|
approle:
|
||||||
- tf_vault
|
- tf_vault
|
||||||
|
k8s/au/syd1:
|
||||||
|
- woodpecker_terraform_vault
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
key_prefix "infra/terraform/artifactapi/" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
|
||||||
|
session_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
key_prefix "infra/terraform/authentik/" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
|
||||||
|
session_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
key_prefix "infra/terraform/git/" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
|
||||||
|
session_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
key_prefix "infra/terraform/prowlarr/" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
|
||||||
|
session_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
key_prefix "infra/terraform/radarr/" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
|
||||||
|
session_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
key_prefix "infra/terraform/sonarr/" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
|
|
||||||
|
session_prefix "" {
|
||||||
|
policy = "write"
|
||||||
|
}
|
||||||
@@ -21,6 +21,7 @@ rules:
|
|||||||
- "logstash.k8s.elastic.co"
|
- "logstash.k8s.elastic.co"
|
||||||
- "elasticsearch.k8s.elastic.co"
|
- "elasticsearch.k8s.elastic.co"
|
||||||
- "kibana.k8s.elastic.co"
|
- "kibana.k8s.elastic.co"
|
||||||
|
- "gateway.networking.k8s.io"
|
||||||
resources:
|
resources:
|
||||||
- "*"
|
- "*"
|
||||||
verbs:
|
verbs:
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ rules:
|
|||||||
- "logstash.k8s.elastic.co"
|
- "logstash.k8s.elastic.co"
|
||||||
- "elasticsearch.k8s.elastic.co"
|
- "elasticsearch.k8s.elastic.co"
|
||||||
- "kibana.k8s.elastic.co"
|
- "kibana.k8s.elastic.co"
|
||||||
|
- "gateway.networking.k8s.io"
|
||||||
resources:
|
resources:
|
||||||
- "*"
|
- "*"
|
||||||
verbs:
|
verbs:
|
||||||
|
|||||||
Reference in New Issue
Block a user