Skip to content

Commit

Permalink
Merge pull request #56 from projectsyn/template-sync
Browse files Browse the repository at this point in the history
Update from component template
  • Loading branch information
simu authored Apr 6, 2023
2 parents cc1bf68 + 2f5f9ec commit faa4fc1
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/projectsyn/commodore-component-template.git",
"commit": "5b2799d8242f1c59beaa9502599ca88f9e006db4",
"commit": "956a1b342ed680b02b1fb1b646dc5d4c640e2028",
"checkout": "main",
"context": {
"cookiecutter": {
Expand Down
4 changes: 2 additions & 2 deletions Makefile.vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ YAMLLINT_CONFIG ?= .yamllint.yml
YAMLLINT_IMAGE ?= docker.io/cytopia/yamllint:latest
YAMLLINT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) $(YAMLLINT_IMAGE)

VALE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --volume "$${PWD}"/docs/modules:/pages docker.io/vshn/vale:2.1.1
VALE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --volume "$${PWD}"/docs/modules:/pages ghcr.io/vshn/vale:2.15.5
VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages

ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD) run --rm --publish 35729:35729 --publish 2020:2020 $(antora_git_volume) --volume "${PWD}/docs":/preview/antora/docs docker.io/vshn/antora-preview:3.0.1.1 --style=syn --antora=docs
ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD) run --rm --publish 35729:35729 --publish 2020:2020 $(antora_git_volume) --volume "${PWD}/docs":/preview/antora/docs ghcr.io/vshn/antora-preview:3.1.2.3 --style=syn --antora=docs

COMMODORE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(git_volume) $(root_volume) docker.io/projectsyn/commodore:latest
COMPILE_CMD ?= $(COMMODORE_CMD) component compile . $(commodore_args)
Expand Down
1 change: 1 addition & 0 deletions docs/modules/ROOT/pages/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Vale config
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
apiVersion: v1
data:
extraconfig-from-values.hcl: "disable_mlock = true\nui = true\nlistener \"tcp\"\
\ {\n tls_disable = true\n address = \"[::]:8200\"\n cluster_address = \"[::]:8201\"\
\n x_forwarded_for_authorized_addrs = \"198.51.100.0/24\"\n x_forwarded_for_hop_skips\
\ = \"0\"\n x_forwarded_for_reject_not_authorized = \"true\"\n x_forwarded_for_reject_not_present\
\ = \"false\"\n}\nlistener \"tcp\" {\n tls_disable = true\n address = \"[::]:9200\"\
\n telemetry {\n unauthenticated_metrics_access = true\n }\n}\nstorage \"\
raft\" {\n path = \"/vault/data\"\n}\nservice_registration \"kubernetes\" {}\n\
telemetry {\n disable_hostname = true\n}"
extraconfig-from-values.hcl: |-
disable_mlock = true
ui = true
listener "tcp" {
tls_disable = true
address = "[::]:8200"
cluster_address = "[::]:8201"
x_forwarded_for_authorized_addrs = "198.51.100.0/24"
x_forwarded_for_hop_skips = "0"
x_forwarded_for_reject_not_authorized = "true"
x_forwarded_for_reject_not_present = "false"
}
listener "tcp" {
tls_disable = true
address = "[::]:9200"
telemetry {
unauthenticated_metrics_access = true
}
}
storage "raft" {
path = "/vault/data"
}
service_registration "kubernetes" {}
telemetry {
disable_hostname = true
}
kind: ConfigMap
metadata:
labels:
Expand Down
52 changes: 38 additions & 14 deletions tests/golden/defaults/vault/vault/22_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,44 @@ metadata:
name: foobar
namespace: vault
stringData:
vault-config.yml: "\"auth\":\n- \"roles\":\n - \"bound_service_account_names\"\
: \"foobar-backup\"\n \"bound_service_account_namespaces\": \"vault\"\n \
\ \"name\": \"backup\"\n \"policies\": \"backup\"\n \"ttl\": \"1h\"\n \"\
type\": \"kubernetes\"\n- \"roles\":\n - \"bound_service_account_names\": \"\
foobar-backup\"\n \"bound_service_account_namespaces\": \"vault\"\n \"name\"\
: \"backup\"\n \"policies\": \"backup\"\n \"ttl\": \"1h\"\n \"type\": \"\
kubernetes\"\n\"policies\":\n- \"name\": \"backup\"\n \"rules\": |\n path\
\ \"sys/storage/raft/snapshot\" {\n capabilities = [\"read\"]\n }\n- \"\
name\": \"backup\"\n \"rules\": |\n path \"sys/storage/raft/snapshot\" {\n\
\ capabilities = [\"read\"]\n }\n\"secrets\":\n- \"description\": \"General\
\ secrets for clusters\"\n \"options\":\n \"version\": 2\n \"path\": \"clusters/kv\"\
\n \"type\": \"kv\"\n- \"description\": \"General secrets for clusters\"\n \"\
options\":\n \"version\": 2\n \"path\": \"clustersSecret/kv\"\n \"type\"\
: \"kv\""
vault-config.yml: |-
"auth":
- "roles":
- "bound_service_account_names": "foobar-backup"
"bound_service_account_namespaces": "vault"
"name": "backup"
"policies": "backup"
"ttl": "1h"
"type": "kubernetes"
- "roles":
- "bound_service_account_names": "foobar-backup"
"bound_service_account_namespaces": "vault"
"name": "backup"
"policies": "backup"
"ttl": "1h"
"type": "kubernetes"
"policies":
- "name": "backup"
"rules": |
path "sys/storage/raft/snapshot" {
capabilities = ["read"]
}
- "name": "backup"
"rules": |
path "sys/storage/raft/snapshot" {
capabilities = ["read"]
}
"secrets":
- "description": "General secrets for clusters"
"options":
"version": 2
"path": "clusters/kv"
"type": "kv"
- "description": "General secrets for clusters"
"options":
"version": 2
"path": "clustersSecret/kv"
"type": "kv"
type: Opaque
---
apiVersion: apps/v1
Expand Down
19 changes: 15 additions & 4 deletions tests/golden/defaults/vault/vault/30_backup/32_backup.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
apiVersion: v1
data:
vault-agent-config.hcl: "exit_after_auth = false\nauto_auth {\n method \"kubernetes\"\
\ {\n config = {\n role = \"backup\"\n }\n }\n \
\ sink \"file\" {\n config = {\n path = \"/home/vault/.vault-token\"\
\n mode = 0644\n }\n }\n}\n"
vault-agent-config.hcl: |
exit_after_auth = false
auto_auth {
method "kubernetes" {
config = {
role = "backup"
}
}
sink "file" {
config = {
path = "/home/vault/.vault-token"
mode = 0644
}
}
}
kind: ConfigMap
metadata:
annotations: {}
Expand Down

0 comments on commit faa4fc1

Please sign in to comment.