Skip to content

Commit

Permalink
Merge pull request #12 from appuio/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 5249cb0 + 03a28e0 commit efb0cbd
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 30 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": "804e9c72df5f0507e18de8a374fc35b694b6fb08",
"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 @@ -34,10 +34,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
Expand Up @@ -20,17 +20,11 @@ groups:
kind: SecurityContextConstraints
metadata:
annotations:
kubernetes.io/description: 'Copy of `privileged` with increased priority to be
choosen over other custom SCCs.
kubernetes.io/description: |
Copy of `privileged` with increased priority to be choosen over other custom SCCs.
privileged allows access to all privileged and host features and the ability
to run as any user, any group, any fsGroup, and with any SELinux context.
WARNING: this is the most relaxed SCC and should be used only for cluster administration.
Grant with caution.
'
privileged allows access to all privileged and host features and the ability to run as any user, any group, any fsGroup, and with any SELinux context.
WARNING: this is the most relaxed SCC and should be used only for cluster administration. Grant with caution.
labels:
app.kubernetes.io/component: openshift4-config
app.kubernetes.io/managed-by: commodore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ groups:
kind: SecurityContextConstraints
metadata:
annotations:
kubernetes.io/description: 'Copy of `privileged` with increased priority to be
choosen over other custom SCCs.
kubernetes.io/description: |
Copy of `privileged` with increased priority to be choosen over other custom SCCs.
privileged allows access to all privileged and host features and the ability
to run as any user, any group, any fsGroup, and with any SELinux context.
WARNING: this is the most relaxed SCC and should be used only for cluster administration.
Grant with caution.
'
privileged allows access to all privileged and host features and the ability to run as any user, any group, any fsGroup, and with any SELinux context.
WARNING: this is the most relaxed SCC and should be used only for cluster administration. Grant with caution.
labels:
app.kubernetes.io/component: openshift4-config
app.kubernetes.io/managed-by: commodore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,19 @@ metadata:
name: syn-update-cluster-pull-secret-script
name: syn-update-cluster-pull-secret-script
stringData:
sync-secret.sh: "#!/bin/bash\nset -eu\n\npull_secret=$(\n kubectl get secret\
\ pull-secret \\\n -o go-template='{{index .data \".dockerconfigjson\"|base64decode}}'\n\
)\npatched_secret=$(\n jq -cr '.auths.\"ghcr.io\"={\"auth\": \"t-silent-test-1234/c-green-test-1234/openshift4-config/pullSecrets/ghcr.io-pull-secret\"\
, \"email\": \"[email protected]\"} |.auths.\"quay.io\"=null |del(..|nulls)|@base64'\
\ <<<\"${pull_secret}\"\n)\nkubectl -n openshift-config patch secret pull-secret\
\ \\\n -p \"{\\\"data\\\": {\\\".dockerconfigjson\\\": \\\"$patched_secret\\\"\
}}\"\n"
sync-secret.sh: |
#!/bin/bash
set -eu
pull_secret=$(
kubectl get secret pull-secret \
-o go-template='{{index .data ".dockerconfigjson"|base64decode}}'
)
patched_secret=$(
jq -cr '.auths."ghcr.io"={"auth": "t-silent-test-1234/c-green-test-1234/openshift4-config/pullSecrets/ghcr.io-pull-secret", "email": "[email protected]"} |.auths."quay.io"=null |del(..|nulls)|@base64' <<<"${pull_secret}"
)
kubectl -n openshift-config patch secret pull-secret \
-p "{\"data\": {\".dockerconfigjson\": \"$patched_secret\"}}"
type: Opaque
---
apiVersion: batch/v1
Expand Down

0 comments on commit efb0cbd

Please sign in to comment.