Compare commits
124 commits
forgejo_ru
...
developmen
Author | SHA1 | Date | |
---|---|---|---|
4888c9db93 | |||
ffd5111bce | |||
16dde9ead1 | |||
f434e0680f | |||
d3546717c0 | |||
dbd391d29c | |||
4fd88985ef | |||
7287a6cf56 | |||
183cec8a9d | |||
![]() |
abeeb7ee23 | ||
aec54530f8 | |||
7e599a9422 | |||
fbee7995e1 | |||
15d9160b16 | |||
ee08dc2f33 | |||
![]() |
4eb6fa0908 | ||
6afdc2c64f | |||
c8eac10fcf | |||
4447c29987 | |||
9bb0063f8b | |||
6ac5a94503 | |||
f783a582c6 | |||
4e50289d91 | |||
ba2b7dbc9f | |||
9dd9184cfd | |||
0e26cc9a3f | |||
0668eb7c5f | |||
74523447ae | |||
cce8c51b75 | |||
11d9ad5fcc | |||
42d65e95be | |||
5165583b9a | |||
701771ad13 | |||
d90402b74a | |||
b533f7adf3 | |||
620f7a3fd9 | |||
1a8c2846bc | |||
ead21d078a | |||
30d1d51884 | |||
![]() |
33def8aba5 | ||
0a307e5b35 | |||
![]() |
55a1eaa6f6 | ||
![]() |
2532958de8 | ||
7a5e29e47d | |||
3943b3d46e | |||
3263113ebe | |||
5d0182d6ee | |||
c01d4952ad | |||
777d6afeb4 | |||
d6fa372e5f | |||
![]() |
51e765049b | ||
4814dff26f | |||
b3495f610c | |||
9ba027f94b | |||
dd7551a293 | |||
7179d2568c | |||
![]() |
55435a3ad2 | ||
![]() |
d0585fd2b7 | ||
5d2df3db8e | |||
65b74abeda | |||
fc287acf58 | |||
94e3a759b2 | |||
31b768eebc | |||
9b5457e45f | |||
![]() |
c1b68bfdb2 | ||
beeb1f916b | |||
b42bba4379 | |||
5cc22c5648 | |||
2f5a263511 | |||
d8867b9e3a | |||
415576c2cb | |||
1e5fa94c47 | |||
8f621647f5 | |||
74a77bfa3b | |||
3293f9cf5a | |||
75f40e070c | |||
b462804f29 | |||
fbb5aeb32b | |||
687322525b | |||
1682302b69 | |||
8f62875529 | |||
ddaf06b29c | |||
180b74697a | |||
3a5df11604 | |||
81e85ff518 | |||
dd7cd2fa91 | |||
71fbdcb5e0 | |||
0d49c582f5 | |||
303d7b3a7e | |||
1ab8119063 | |||
f81a550064 | |||
![]() |
a9c69d6c24 | ||
![]() |
c2cb410af8 | ||
2698432809 | |||
![]() |
d0cce6916d | ||
![]() |
aba4a4a088 | ||
![]() |
4ae8f6fd15 | ||
![]() |
1198250861 | ||
9bbf171980 | |||
d95ba7c12c | |||
8a38aee529 | |||
![]() |
1ef1029e1f | ||
![]() |
63a694d17c | ||
![]() |
6eb52e654c | ||
![]() |
ec31f98889 | ||
![]() |
2d3ebadd50 | ||
![]() |
b58e373da9 | ||
![]() |
688795ffad | ||
![]() |
e02d4bb272 | ||
![]() |
efa3a6e4dc | ||
![]() |
65c5321ce6 | ||
![]() |
ce6c51eea9 | ||
0f8282ead6 | |||
88d599a691 | |||
9016831286 | |||
168286cfce | |||
9cc9b864a2 | |||
265af3acff | |||
f311da6ac2 | |||
![]() |
8c84170ca2 | ||
b3306647c9 | |||
![]() |
e3f1899983 | ||
![]() |
394dc9f400 | ||
cc34792edb |
76 changed files with 1019 additions and 349 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/.history
|
|
@ -13,7 +13,7 @@ spec:
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
source:
|
source:
|
||||||
path: registry
|
path: registry
|
||||||
repoURL: 'https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder'
|
repoURL: 'https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder'
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
project: default
|
project: default
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
|
|
@ -13,7 +13,7 @@ spec:
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
source:
|
source:
|
||||||
path: stacks/core
|
path: stacks/core
|
||||||
repoURL: 'https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder'
|
repoURL: 'https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder'
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
project: default
|
project: default
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
|
|
@ -13,7 +13,7 @@ spec:
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
source:
|
source:
|
||||||
path: stacks/local-backup
|
path: stacks/local-backup
|
||||||
repoURL: 'https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder'
|
repoURL: 'https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder'
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
project: default
|
project: default
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
|
|
@ -13,7 +13,7 @@ spec:
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
source:
|
source:
|
||||||
path: stacks/monitoring
|
path: stacks/monitoring
|
||||||
repoURL: 'https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder'
|
repoURL: 'https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder'
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
project: default
|
project: default
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
|
|
@ -13,7 +13,7 @@ spec:
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
source:
|
source:
|
||||||
path: stacks/ref-implementation
|
path: stacks/ref-implementation
|
||||||
repoURL: 'https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder'
|
repoURL: 'https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder'
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
project: default
|
project: default
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
|
|
@ -13,7 +13,7 @@ spec:
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
source:
|
source:
|
||||||
path: stacks/second-cluster
|
path: stacks/second-cluster
|
||||||
repoURL: 'https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder'
|
repoURL: 'https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder'
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
project: default
|
project: default
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
|
29
template/stacks/core/argocd-sso.yaml
Normal file
29
template/stacks/core/argocd-sso.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: argocd-sso
|
||||||
|
namespace: argocd
|
||||||
|
labels:
|
||||||
|
env: dev
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: "stacks/core/argocd-sso"
|
||||||
|
destination:
|
||||||
|
server: "https://kubernetes.default.svc"
|
||||||
|
namespace: argocd
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
retry:
|
||||||
|
limit: -1
|
||||||
|
backoff:
|
||||||
|
duration: 15s
|
||||||
|
factor: 1
|
||||||
|
maxDuration: 15s
|
|
@ -0,0 +1,29 @@
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: forgejo-access-token
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
name: gitea
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
refreshInterval: "0"
|
||||||
|
target:
|
||||||
|
name: forgejo-access-token
|
||||||
|
template:
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
forgejo_username: "{{.FORGEJO_ACCESS_USERNAME}}"
|
||||||
|
forgejo_token: "{{.FORGEJO_ACCESS_TOKEN}}"
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/part-of: argocd
|
||||||
|
data:
|
||||||
|
- secretKey: FORGEJO_ACCESS_USERNAME
|
||||||
|
remoteRef:
|
||||||
|
key: forgejo-access-token
|
||||||
|
property: username
|
||||||
|
- secretKey: FORGEJO_ACCESS_TOKEN
|
||||||
|
remoteRef:
|
||||||
|
key: forgejo-access-token
|
||||||
|
property: token
|
24
template/stacks/core/argocd-sso/argocd-secret.yaml
Normal file
24
template/stacks/core/argocd-sso/argocd-secret.yaml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: auth-generic-oauth-secret
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
name: keycloak
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
refreshInterval: "0"
|
||||||
|
target:
|
||||||
|
name: auth-generic-oauth-secret
|
||||||
|
template:
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
client_secret: "{{.ARGOCD_CLIENT_SECRET}}"
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/part-of: argocd
|
||||||
|
data:
|
||||||
|
- secretKey: ARGOCD_CLIENT_SECRET
|
||||||
|
remoteRef:
|
||||||
|
key: keycloak-clients
|
||||||
|
property: ARGOCD_CLIENT_SECRET
|
54
template/stacks/core/argocd-sso/argocd-sso-config.yaml
Normal file
54
template/stacks/core/argocd-sso/argocd-sso-config.yaml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: argocd-config
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
generateName: argocd-config-
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
containers:
|
||||||
|
- name: push
|
||||||
|
image: docker.io/library/ubuntu:22.04
|
||||||
|
env:
|
||||||
|
- name: FORGEJO_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: forgejo-access-token
|
||||||
|
key: forgejo_username
|
||||||
|
- name: FORGEJO_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: forgejo-access-token
|
||||||
|
key: forgejo_token
|
||||||
|
command: ["/bin/bash", "-c"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
apt -qq update
|
||||||
|
apt -qq install git wget -y
|
||||||
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||||
|
wget https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64
|
||||||
|
install yq_linux_amd64 /usr/local/bin/yq
|
||||||
|
rm yq_linux_amd64
|
||||||
|
else
|
||||||
|
wget https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_arm64
|
||||||
|
install yq_linux_arm64 /usr/local/bin/yq
|
||||||
|
rm yq_linux_arm64
|
||||||
|
fi
|
||||||
|
|
||||||
|
git config --global user.email "bot@bots.de"
|
||||||
|
git config --global user.name "bot"
|
||||||
|
|
||||||
|
git clone https://${FORGEJO_USER}:${FORGEJO_TOKEN}@{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder.git
|
||||||
|
cd edfbuilder
|
||||||
|
yq eval '.configs.cm."oidc.config" = "name: Keycloak\nissuer: https://{{{ .Env.DOMAIN }}}/keycloak/realms/cnoe\nclientID: argocd\nclientSecret: $auth-generic-oauth-secret:client_secret\nrequestedScopes: [\"openid\", \"profile\", \"email\", \"groups\"]"' -i stacks/core/argocd/values.yaml
|
||||||
|
|
||||||
|
git add stacks/core/argocd/values.yaml
|
||||||
|
git commit -m "adds Forgejo SSO config"
|
||||||
|
git push
|
||||||
|
backoffLimit: 99
|
|
@ -16,12 +16,15 @@ spec:
|
||||||
name: in-cluster
|
name: in-cluster
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
sources:
|
sources:
|
||||||
- repoURL: https://github.com/argoproj/argo-helm
|
- repoURL: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/argocd-helm.git
|
||||||
path: charts/argo-cd
|
path: charts/argo-cd
|
||||||
targetRevision: argo-cd-7.7.5
|
# TODO: RIRE Can be updated when https://github.com/argoproj/argo-cd/issues/20790 is fixed and merged
|
||||||
|
# As logout make problems, it is suggested to switch from path based routing to an own argocd domain,
|
||||||
|
# similar to the CNOE amazon reference implementation and in our case, Forgejo
|
||||||
|
targetRevision: argo-cd-7.8.14-depends
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/core/argocd/values.yaml
|
- $values/stacks/core/argocd/values.yaml
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
||||||
|
|
|
@ -5,6 +5,7 @@ configs:
|
||||||
params:
|
params:
|
||||||
server.insecure: true
|
server.insecure: true
|
||||||
server.basehref: /argocd
|
server.basehref: /argocd
|
||||||
|
server.rootpath: /argocd
|
||||||
cm:
|
cm:
|
||||||
application.resourceTrackingMethod: annotation
|
application.resourceTrackingMethod: annotation
|
||||||
timeout.reconciliation: 60s
|
timeout.reconciliation: 60s
|
||||||
|
@ -20,6 +21,7 @@ configs:
|
||||||
clusters:
|
clusters:
|
||||||
- "*"
|
- "*"
|
||||||
accounts.provider-argocd: apiKey
|
accounts.provider-argocd: apiKey
|
||||||
|
url: https://{{{ .Env.DOMAIN }}}/argocd
|
||||||
rbac:
|
rbac:
|
||||||
policy.csv: 'g, provider-argocd, role:admin'
|
policy.csv: 'g, provider-argocd, role:admin'
|
||||||
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
apiVersion: apiextensions.crossplane.io/v1
|
|
||||||
kind: CompositeResourceDefinition
|
|
||||||
metadata:
|
|
||||||
name: edfbuilders.edfbuilder.crossplane.io
|
|
||||||
spec:
|
|
||||||
connectionSecretKeys:
|
|
||||||
- kubeconfig
|
|
||||||
group: edfbuilder.crossplane.io
|
|
||||||
names:
|
|
||||||
kind: EDFBuilder
|
|
||||||
listKind: EDFBuilderList
|
|
||||||
plural: edfbuilders
|
|
||||||
singular: edfbuilders
|
|
||||||
versions:
|
|
||||||
- name: v1alpha1
|
|
||||||
served: true
|
|
||||||
referenceable: true
|
|
||||||
schema:
|
|
||||||
openAPIV3Schema:
|
|
||||||
description: A EDFBuilder is a composite resource that represents a K8S Cluster with edfbuilder Installed
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
spec:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
repoURL:
|
|
||||||
type: string
|
|
||||||
description: URL to ArgoCD stack of stacks repo
|
|
||||||
required:
|
|
||||||
- repoURL
|
|
|
@ -1,9 +0,0 @@
|
||||||
apiVersion: pkg.crossplane.io/v1
|
|
||||||
kind: Function
|
|
||||||
metadata:
|
|
||||||
name: crossplane-contrib-function-patch-and-transform
|
|
||||||
spec:
|
|
||||||
package: xpkg.upbound.io/crossplane-contrib/function-patch-and-transform:v0.7.0
|
|
||||||
packagePullPolicy: IfNotPresent # Only download the package if it isn’t in the cache.
|
|
||||||
revisionActivationPolicy: Automatic # Otherwise our Provider never gets activate & healthy
|
|
||||||
revisionHistoryLimit: 1
|
|
|
@ -1,14 +0,0 @@
|
||||||
apiVersion: argocd.crossplane.io/v1alpha1
|
|
||||||
kind: ProviderConfig
|
|
||||||
metadata:
|
|
||||||
name: argocd-provider
|
|
||||||
spec:
|
|
||||||
serverAddr: argocd-server.argocd.svc.cluster.local:80
|
|
||||||
insecure: true
|
|
||||||
plainText: true
|
|
||||||
credentials:
|
|
||||||
source: Secret
|
|
||||||
secretRef:
|
|
||||||
namespace: crossplane-system
|
|
||||||
name: argocd-credentials
|
|
||||||
key: authToken
|
|
|
@ -1,9 +0,0 @@
|
||||||
apiVersion: pkg.crossplane.io/v1
|
|
||||||
kind: Provider
|
|
||||||
metadata:
|
|
||||||
name: provider-argocd
|
|
||||||
spec:
|
|
||||||
package: xpkg.upbound.io/crossplane-contrib/provider-argocd:v0.9.1
|
|
||||||
packagePullPolicy: IfNotPresent # Only download the package if it isn’t in the cache.
|
|
||||||
revisionActivationPolicy: Automatic # Otherwise our Provider never gets activate & healthy
|
|
||||||
revisionHistoryLimit: 1
|
|
|
@ -1,14 +0,0 @@
|
||||||
apiVersion: kind.crossplane.io/v1alpha1
|
|
||||||
kind: ProviderConfig
|
|
||||||
metadata:
|
|
||||||
name: kind-provider
|
|
||||||
spec:
|
|
||||||
credentials:
|
|
||||||
source: Secret
|
|
||||||
secretRef:
|
|
||||||
namespace: crossplane-system
|
|
||||||
name: kind-credentials
|
|
||||||
key: credentials
|
|
||||||
endpoint:
|
|
||||||
# the url is managed by crossplane-edfbuilder
|
|
||||||
url: https://DOCKER_HOST:SERVER_PORT/api/v1/kindserver
|
|
|
@ -1,9 +0,0 @@
|
||||||
apiVersion: pkg.crossplane.io/v1
|
|
||||||
kind: Provider
|
|
||||||
metadata:
|
|
||||||
name: provider-kind
|
|
||||||
spec:
|
|
||||||
package: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/provider-kind:v0.1.0
|
|
||||||
packagePullPolicy: IfNotPresent # Only download the package if it isn’t in the cache.
|
|
||||||
revisionActivationPolicy: Automatic # Otherwise our Provider never gets activate & healthy
|
|
||||||
revisionHistoryLimit: 1
|
|
|
@ -1,9 +0,0 @@
|
||||||
apiVersion: pkg.crossplane.io/v1
|
|
||||||
kind: Provider
|
|
||||||
metadata:
|
|
||||||
name: provider-shell
|
|
||||||
spec:
|
|
||||||
package: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/provider-shell:v0.1.1
|
|
||||||
packagePullPolicy: IfNotPresent # Only download the package if it isn’t in the cache.
|
|
||||||
revisionActivationPolicy: Automatic # Otherwise our Provider never gets activate & healthy
|
|
||||||
revisionHistoryLimit: 1
|
|
|
@ -1,23 +0,0 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: crossplane
|
|
||||||
namespace: argocd
|
|
||||||
labels:
|
|
||||||
env: dev
|
|
||||||
spec:
|
|
||||||
project: default
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
selfHeal: true
|
|
||||||
syncOptions:
|
|
||||||
- CreateNamespace=true
|
|
||||||
destination:
|
|
||||||
name: in-cluster
|
|
||||||
namespace: crossplane-system
|
|
||||||
source:
|
|
||||||
chart: crossplane
|
|
||||||
repoURL: https://charts.crossplane.io/stable
|
|
||||||
targetRevision: 1.18.0
|
|
||||||
helm:
|
|
||||||
releaseName: crossplane
|
|
|
@ -1,10 +1,12 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: crossplane-compositions
|
name: forgejo-runner
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
labels:
|
labels:
|
||||||
env: dev
|
env: dev
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
|
@ -13,11 +15,8 @@ spec:
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
destination:
|
destination:
|
||||||
name: in-cluster
|
server: "https://kubernetes.default.svc"
|
||||||
namespace: crossplane-system
|
|
||||||
source:
|
source:
|
||||||
path: stacks/core/crossplane-compositions
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
directory:
|
path: "stacks/core/forgejo-runner"
|
||||||
recurse: true
|
|
104
template/stacks/core/forgejo-runner/dind-docker.yaml
Normal file
104
template/stacks/core/forgejo-runner/dind-docker.yaml
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: forgejo-runner
|
||||||
|
name: forgejo-runner
|
||||||
|
namespace: gitea
|
||||||
|
spec:
|
||||||
|
# Two replicas means that if one is busy, the other can pick up jobs.
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: forgejo-runner
|
||||||
|
strategy: {}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
app: forgejo-runner
|
||||||
|
spec:
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: docker-certs
|
||||||
|
emptyDir: {}
|
||||||
|
- name: runner-data
|
||||||
|
emptyDir: {}
|
||||||
|
# Initialise our configuration file using offline registration
|
||||||
|
# https://forgejo.org/docs/v1.21/admin/actions/#offline-registration
|
||||||
|
initContainers:
|
||||||
|
- name: runner-register
|
||||||
|
image: code.forgejo.org/forgejo/runner:6.3.1
|
||||||
|
command:
|
||||||
|
- "sh"
|
||||||
|
- "-c"
|
||||||
|
- |
|
||||||
|
forgejo-runner \
|
||||||
|
register \
|
||||||
|
--no-interactive \
|
||||||
|
--token ${RUNNER_SECRET} \
|
||||||
|
--name ${RUNNER_NAME} \
|
||||||
|
--instance ${FORGEJO_INSTANCE_URL} \
|
||||||
|
--labels docker:docker://node:20-bookworm,ubuntu-22.04:docker://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/catthehackerubuntu:act-22.04,ubuntu-latest:docker://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/catthehackerubuntu:act-22.04
|
||||||
|
env:
|
||||||
|
- name: RUNNER_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: RUNNER_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: forgejo-runner-token
|
||||||
|
key: token
|
||||||
|
- name: FORGEJO_INSTANCE_URL
|
||||||
|
value: https://{{{ .Env.DOMAIN_GITEA }}}
|
||||||
|
volumeMounts:
|
||||||
|
- name: runner-data
|
||||||
|
mountPath: /data
|
||||||
|
containers:
|
||||||
|
- name: runner
|
||||||
|
image: code.forgejo.org/forgejo/runner:6.3.1
|
||||||
|
command:
|
||||||
|
- "sh"
|
||||||
|
- "-c"
|
||||||
|
- |
|
||||||
|
while ! nc -z 127.0.0.1 2376 </dev/null; do
|
||||||
|
echo 'waiting for docker daemon...';
|
||||||
|
sleep 5;
|
||||||
|
done
|
||||||
|
forgejo-runner generate-config > config.yml ;
|
||||||
|
sed -i -e "s|privileged: .*|privileged: true|" config.yml
|
||||||
|
sed -i -e "s|network: .*|network: host|" config.yml ;
|
||||||
|
sed -i -e "s|^ envs:$$| envs:\n DOCKER_HOST: tcp://127.0.0.1:2376\n DOCKER_TLS_VERIFY: 1\n DOCKER_CERT_PATH: /certs/client|" config.yml ;
|
||||||
|
sed -i -e "s|^ options:| options: -v /certs/client:/certs/client|" config.yml ;
|
||||||
|
sed -i -e "s| valid_volumes: \[\]$$| valid_volumes:\n - /certs/client|" config.yml ;
|
||||||
|
/bin/forgejo-runner --config config.yml daemon
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: true
|
||||||
|
privileged: true
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
runAsGroup: 0
|
||||||
|
runAsNonRoot: false
|
||||||
|
runAsUser: 0
|
||||||
|
env:
|
||||||
|
- name: DOCKER_HOST
|
||||||
|
value: tcp://localhost:2376
|
||||||
|
- name: DOCKER_CERT_PATH
|
||||||
|
value: /certs/client
|
||||||
|
- name: DOCKER_TLS_VERIFY
|
||||||
|
value: "1"
|
||||||
|
volumeMounts:
|
||||||
|
- name: docker-certs
|
||||||
|
mountPath: /certs
|
||||||
|
- name: runner-data
|
||||||
|
mountPath: /data
|
||||||
|
- name: daemon
|
||||||
|
image: docker:28.0.4-dind
|
||||||
|
env:
|
||||||
|
- name: DOCKER_TLS_CERTDIR
|
||||||
|
value: /certs
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
volumeMounts:
|
||||||
|
- name: docker-certs
|
||||||
|
mountPath: /certs
|
29
template/stacks/core/forgejo-sso.yaml
Normal file
29
template/stacks/core/forgejo-sso.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: forgejo-sso
|
||||||
|
namespace: argocd
|
||||||
|
labels:
|
||||||
|
env: dev
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: "stacks/core/forgejo-sso"
|
||||||
|
destination:
|
||||||
|
server: "https://kubernetes.default.svc"
|
||||||
|
namespace: gitea
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
retry:
|
||||||
|
limit: -1
|
||||||
|
backoff:
|
||||||
|
duration: 15s
|
||||||
|
factor: 1
|
||||||
|
maxDuration: 15s
|
26
template/stacks/core/forgejo-sso/forgejo-access-token.yaml
Normal file
26
template/stacks/core/forgejo-sso/forgejo-access-token.yaml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: forgejo-access-token
|
||||||
|
namespace: gitea
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
name: gitea
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
refreshInterval: "0"
|
||||||
|
target:
|
||||||
|
name: forgejo-access-token
|
||||||
|
template:
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
forgejo_username: "{{.FORGEJO_ACCESS_USERNAME}}"
|
||||||
|
forgejo_token: "{{.FORGEJO_ACCESS_TOKEN}}"
|
||||||
|
data:
|
||||||
|
- secretKey: FORGEJO_ACCESS_USERNAME
|
||||||
|
remoteRef:
|
||||||
|
key: forgejo-access-token
|
||||||
|
property: username
|
||||||
|
- secretKey: FORGEJO_ACCESS_TOKEN
|
||||||
|
remoteRef:
|
||||||
|
key: forgejo-access-token
|
||||||
|
property: token
|
26
template/stacks/core/forgejo-sso/forgejo-secret.yaml
Normal file
26
template/stacks/core/forgejo-sso/forgejo-secret.yaml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: auth-generic-oauth-secret
|
||||||
|
namespace: gitea
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
name: keycloak
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
refreshInterval: "0"
|
||||||
|
target:
|
||||||
|
name: auth-generic-oauth-secret
|
||||||
|
template:
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
key: "{{.FORGEJO_CLIENT_ID}}"
|
||||||
|
secret: "{{.FORGEJO_CLIENT_SECRET}}"
|
||||||
|
data:
|
||||||
|
- secretKey: FORGEJO_CLIENT_ID
|
||||||
|
remoteRef:
|
||||||
|
key: keycloak-clients
|
||||||
|
property: FORGEJO_CLIENT_ID
|
||||||
|
- secretKey: FORGEJO_CLIENT_SECRET
|
||||||
|
remoteRef:
|
||||||
|
key: keycloak-clients
|
||||||
|
property: FORGEJO_CLIENT_SECRET
|
76
template/stacks/core/forgejo-sso/forgejo-sso-config.yaml
Normal file
76
template/stacks/core/forgejo-sso/forgejo-sso-config.yaml
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: forgejo-config
|
||||||
|
namespace: gitea
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
generateName: forgejo-config-
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
containers:
|
||||||
|
- name: push
|
||||||
|
image: docker.io/library/ubuntu:22.04
|
||||||
|
env:
|
||||||
|
- name: FORGEJO_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: forgejo-access-token
|
||||||
|
key: forgejo_username
|
||||||
|
- name: FORGEJO_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: forgejo-access-token
|
||||||
|
key: forgejo_token
|
||||||
|
command: ["/bin/bash", "-c"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
apt -qq update
|
||||||
|
apt -qq install git wget -y
|
||||||
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||||
|
wget https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64
|
||||||
|
install yq_linux_amd64 /usr/local/bin/yq
|
||||||
|
rm yq_linux_amd64
|
||||||
|
else
|
||||||
|
wget https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_arm64
|
||||||
|
install yq_linux_arm64 /usr/local/bin/yq
|
||||||
|
rm yq_linux_arm64
|
||||||
|
fi
|
||||||
|
|
||||||
|
git config --global user.email "bot@bots.de"
|
||||||
|
git config --global user.name "giteaAdmin"
|
||||||
|
|
||||||
|
git clone https://${FORGEJO_USER}:${FORGEJO_TOKEN}@{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder.git
|
||||||
|
cd edfbuilder
|
||||||
|
yq eval ".gitea.oauth = [
|
||||||
|
{
|
||||||
|
\"name\": \"Keycloak\",
|
||||||
|
\"provider\": \"openidConnect\",
|
||||||
|
\"existingSecret\": \"auth-generic-oauth-secret\",
|
||||||
|
\"autoDiscoverUrl\": \"https://{{{ .Env.DOMAIN }}}/keycloak/realms/cnoe/.well-known/openid-configuration\"
|
||||||
|
}
|
||||||
|
] |
|
||||||
|
(.gitea.oauth[] | .name) |= (. style=\"single\")
|
||||||
|
|
|
||||||
|
(.gitea.oauth[] | .provider) |= (. style=\"single\")
|
||||||
|
|
|
||||||
|
(.gitea.oauth[] | .existingSecret) |= (. style=\"single\")
|
||||||
|
|
|
||||||
|
(.gitea.oauth[] | .autoDiscoverUrl) |= (. style=\"single\")
|
||||||
|
" -i stacks/core/forgejo/values.yaml
|
||||||
|
|
||||||
|
yq eval '.gitea.config.oauth2_client =
|
||||||
|
{
|
||||||
|
"ENABLE_AUTO_REGISTRATION" : true,
|
||||||
|
"ACCOUNT_LINKING" : "auto"
|
||||||
|
}
|
||||||
|
' -i stacks/core/forgejo/values.yaml
|
||||||
|
|
||||||
|
git add stacks/core/forgejo/values.yaml
|
||||||
|
git commit -m "adds Forgejo SSO config"
|
||||||
|
git push
|
||||||
|
backoffLimit: 99
|
|
@ -16,12 +16,12 @@ spec:
|
||||||
name: in-cluster
|
name: in-cluster
|
||||||
namespace: gitea
|
namespace: gitea
|
||||||
sources:
|
sources:
|
||||||
- repoURL: https://code.forgejo.org/forgejo-helm/forgejo-helm.git
|
- repoURL: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/forgejo-helm.git
|
||||||
path: .
|
path: .
|
||||||
targetRevision: v10.1.1
|
targetRevision: v12.0.0-depends
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/core/forgejo/values.yaml
|
- $values/stacks/core/forgejo/values.yaml
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
redis-cluster:
|
redis-cluster:
|
||||||
enabled: false
|
enabled: true
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: false
|
enabled: false
|
||||||
postgresql-ha:
|
postgresql-ha:
|
||||||
|
@ -16,6 +16,11 @@ gitea:
|
||||||
admin:
|
admin:
|
||||||
existingSecret: gitea-credential
|
existingSecret: gitea-credential
|
||||||
config:
|
config:
|
||||||
|
service:
|
||||||
|
DISABLE_REGISTRATION: true
|
||||||
|
other:
|
||||||
|
SHOW_FOOTER_VERSION: false
|
||||||
|
SHOW_FOOTER_TEMPLATE_LOAD_TIME: false
|
||||||
database:
|
database:
|
||||||
DB_TYPE: sqlite3
|
DB_TYPE: sqlite3
|
||||||
session:
|
session:
|
||||||
|
@ -25,8 +30,14 @@ gitea:
|
||||||
queue:
|
queue:
|
||||||
TYPE: level
|
TYPE: level
|
||||||
server:
|
server:
|
||||||
DOMAIN: 'gitea.{{{ .Env.DOMAIN }}}'
|
DOMAIN: '{{{ .Env.DOMAIN_GITEA }}}'
|
||||||
ROOT_URL: 'https://gitea.{{{ .Env.DOMAIN }}}:443'
|
ROOT_URL: 'https://{{{ .Env.DOMAIN_GITEA }}}:443'
|
||||||
|
mailer:
|
||||||
|
ENABLED: true
|
||||||
|
FROM: forgejo@{{{ .Env.DOMAIN_GITEA }}}
|
||||||
|
PROTOCOL: smtp
|
||||||
|
SMTP_ADDR: mailhog.mailhog.svc.cluster.local
|
||||||
|
SMTP_PORT: 1025
|
||||||
|
|
||||||
service:
|
service:
|
||||||
ssh:
|
ssh:
|
||||||
|
@ -53,3 +64,4 @@ forgejo:
|
||||||
- docker:docker://node:16-bullseye
|
- docker:docker://node:16-bullseye
|
||||||
- self-hosted:docker://ghcr.io/catthehacker/ubuntu:act-22.04
|
- self-hosted:docker://ghcr.io/catthehacker/ubuntu:act-22.04
|
||||||
- ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04
|
- ubuntu-22.04:docker://ghcr.io/catthehacker/ubuntu:act-22.04
|
||||||
|
- ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-22.04
|
||||||
|
|
|
@ -11,7 +11,7 @@ spec:
|
||||||
destination:
|
destination:
|
||||||
server: "https://kubernetes.default.svc"
|
server: "https://kubernetes.default.svc"
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/core/ingress-apps"
|
path: "stacks/core/ingress-apps"
|
||||||
project: default
|
project: default
|
||||||
|
|
18
template/stacks/core/ingress-apps/alloy.yaml
Normal file
18
template/stacks/core/ingress-apps/alloy.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: alloy
|
||||||
|
namespace: monitoring
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: {{{ .Env.DOMAIN }}}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: alloy
|
||||||
|
port:
|
||||||
|
number: 12345
|
||||||
|
path: /alloy
|
||||||
|
pathType: Prefix
|
|
@ -4,8 +4,6 @@ metadata:
|
||||||
annotations:
|
annotations:
|
||||||
nginx.ingress.kubernetes.io/backend-protocol: HTTP
|
nginx.ingress.kubernetes.io/backend-protocol: HTTP
|
||||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
|
||||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
|
||||||
{{{ if eq .Env.CLUSTER_TYPE "osc" }}}
|
{{{ if eq .Env.CLUSTER_TYPE "osc" }}}
|
||||||
dns.gardener.cloud/class: garden
|
dns.gardener.cloud/class: garden
|
||||||
dns.gardener.cloud/dnsnames: {{{ .Env.DOMAIN }}}
|
dns.gardener.cloud/dnsnames: {{{ .Env.DOMAIN }}}
|
||||||
|
@ -24,8 +22,8 @@ spec:
|
||||||
name: argocd-server
|
name: argocd-server
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
path: /argocd(/|$)(.*)
|
path: /argocd
|
||||||
pathType: ImplementationSpecific
|
pathType: Prefix
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- {{{ .Env.DOMAIN }}}
|
- {{{ .Env.DOMAIN }}}
|
||||||
|
|
|
@ -6,7 +6,7 @@ metadata:
|
||||||
nginx.ingress.kubernetes.io/proxy-body-size: 512m
|
nginx.ingress.kubernetes.io/proxy-body-size: 512m
|
||||||
{{{ if eq .Env.CLUSTER_TYPE "osc" }}}
|
{{{ if eq .Env.CLUSTER_TYPE "osc" }}}
|
||||||
dns.gardener.cloud/class: garden
|
dns.gardener.cloud/class: garden
|
||||||
dns.gardener.cloud/dnsnames: gitea.{{{ .Env.DOMAIN }}}
|
dns.gardener.cloud/dnsnames: {{{ .Env.DOMAIN_GITEA }}}
|
||||||
dns.gardener.cloud/ttl: "600"
|
dns.gardener.cloud/ttl: "600"
|
||||||
{{{ end }}}
|
{{{ end }}}
|
||||||
name: forgejo
|
name: forgejo
|
||||||
|
@ -14,7 +14,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
- host: gitea.{{{ .Env.DOMAIN }}}
|
- host: {{{ .Env.DOMAIN_GITEA }}}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- backend:
|
- backend:
|
||||||
|
@ -26,5 +26,5 @@ spec:
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- gitea.{{{ .Env.DOMAIN }}}
|
- {{{ .Env.DOMAIN_GITEA }}}
|
||||||
secretName: forgejo-net-tls
|
secretName: forgejo-net-tls
|
||||||
|
|
18
template/stacks/core/ingress-apps/mailhog.yaml
Normal file
18
template/stacks/core/ingress-apps/mailhog.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: mailhog
|
||||||
|
namespace: mailhog
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: {{{ .Env.DOMAIN }}}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: mailhog
|
||||||
|
port:
|
||||||
|
number: 8025
|
||||||
|
path: /mailhog
|
||||||
|
pathType: Prefix
|
|
@ -16,12 +16,12 @@ spec:
|
||||||
name: in-cluster
|
name: in-cluster
|
||||||
namespace: ingress-nginx
|
namespace: ingress-nginx
|
||||||
sources:
|
sources:
|
||||||
- repoURL: https://github.com/kubernetes/ingress-nginx
|
- repoURL: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/ingress-nginx-helm.git
|
||||||
path: charts/ingress-nginx
|
path: charts/ingress-nginx
|
||||||
targetRevision: helm-chart-4.11.3
|
targetRevision: helm-chart-4.12.1-depends
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/core/ingress-nginx/values.yaml
|
- $values/stacks/core/ingress-nginx/values.yaml
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
||||||
|
|
|
@ -17,10 +17,10 @@ spec:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/local-backup/minio/helm/values.yaml
|
- $values/stacks/local-backup/minio/helm/values.yaml
|
||||||
chart: minio
|
chart: minio
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/local-backup/minio/manifests"
|
path: "stacks/local-backup/minio/manifests"
|
||||||
destination:
|
destination:
|
||||||
|
|
|
@ -17,7 +17,7 @@ spec:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/local-backup/velero/helm/values.yaml
|
- $values/stacks/local-backup/velero/helm/values.yaml
|
||||||
chart: velero
|
chart: velero
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
||||||
destination:
|
destination:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: promtail
|
name: alloy
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
labels:
|
labels:
|
||||||
env: dev
|
env: dev
|
||||||
|
@ -18,12 +18,12 @@ spec:
|
||||||
name: in-cluster
|
name: in-cluster
|
||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
sources:
|
sources:
|
||||||
- repoURL: https://github.com/grafana/helm-charts
|
- repoURL: https://github.com/grafana/alloy.git
|
||||||
path: charts/promtail
|
path: operations/helm/charts/alloy
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/monitoring/promtail/values.yaml
|
- $values/stacks/monitoring/alloy/values.yaml
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
78
template/stacks/monitoring/alloy/values.yaml
Normal file
78
template/stacks/monitoring/alloy/values.yaml
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
alloy:
|
||||||
|
create: false
|
||||||
|
name: alloy-config
|
||||||
|
key: config.alloy
|
||||||
|
|
||||||
|
uiPathPrefix: "/alloy"
|
||||||
|
|
||||||
|
configMap:
|
||||||
|
content: |-
|
||||||
|
|
||||||
|
logging {
|
||||||
|
level = "info"
|
||||||
|
format = "logfmt"
|
||||||
|
}
|
||||||
|
|
||||||
|
loki.write "local_loki" {
|
||||||
|
endpoint {
|
||||||
|
url = "http://loki-loki-distributed-gateway/loki/api/v1/push"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
discovery.kubernetes "pod" {
|
||||||
|
role = "pod"
|
||||||
|
}
|
||||||
|
|
||||||
|
discovery.kubernetes "nodes" {
|
||||||
|
role = "node"
|
||||||
|
}
|
||||||
|
|
||||||
|
discovery.kubernetes "services" {
|
||||||
|
role = "service"
|
||||||
|
}
|
||||||
|
|
||||||
|
discovery.kubernetes "endpoints" {
|
||||||
|
role = "endpoints"
|
||||||
|
}
|
||||||
|
|
||||||
|
discovery.kubernetes "endpointslices" {
|
||||||
|
role = "endpointslice"
|
||||||
|
}
|
||||||
|
|
||||||
|
discovery.kubernetes "ingresses" {
|
||||||
|
role = "ingress"
|
||||||
|
}
|
||||||
|
|
||||||
|
discovery.relabel "pod_logs" {
|
||||||
|
targets = discovery.kubernetes.pod.targets
|
||||||
|
|
||||||
|
rule {
|
||||||
|
source_labels = ["__meta_kubernetes_namespace"]
|
||||||
|
action = "replace"
|
||||||
|
target_label = "namespace"
|
||||||
|
}
|
||||||
|
|
||||||
|
rule {
|
||||||
|
source_labels = ["__meta_kubernetes_pod_name"]
|
||||||
|
action = "replace"
|
||||||
|
target_label = "pod"
|
||||||
|
}
|
||||||
|
|
||||||
|
rule {
|
||||||
|
source_labels = ["__meta_kubernetes_pod_node_name"]
|
||||||
|
action = "replace"
|
||||||
|
target_label = "node"
|
||||||
|
}
|
||||||
|
|
||||||
|
rule {
|
||||||
|
source_labels = ["__meta_kubernetes_pod_container_name"]
|
||||||
|
action = "replace"
|
||||||
|
target_label = "container"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
loki.source.kubernetes "all_pod_logs" {
|
||||||
|
targets = discovery.relabel.pod_logs.output
|
||||||
|
forward_to = [loki.write.local_loki.receiver]
|
||||||
|
}
|
|
@ -10,7 +10,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/monitoring/kube-prometheus/dashboards"
|
path: "stacks/monitoring/kube-prometheus/dashboards"
|
||||||
destination:
|
destination:
|
||||||
|
|
29
template/stacks/monitoring/kube-prometheus-sso.yaml
Normal file
29
template/stacks/monitoring/kube-prometheus-sso.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: kube-prometheus-sso
|
||||||
|
namespace: argocd
|
||||||
|
labels:
|
||||||
|
env: dev
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: "stacks/monitoring/kube-prometheus-sso"
|
||||||
|
destination:
|
||||||
|
server: "https://kubernetes.default.svc"
|
||||||
|
namespace: monitoring
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
retry:
|
||||||
|
limit: -1
|
||||||
|
backoff:
|
||||||
|
duration: 15s
|
||||||
|
factor: 1
|
||||||
|
maxDuration: 15s
|
|
@ -0,0 +1,21 @@
|
||||||
|
apiVersion: external-secrets.io/v1beta1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: auth-generic-oauth-secret
|
||||||
|
namespace: monitoring
|
||||||
|
spec:
|
||||||
|
secretStoreRef:
|
||||||
|
name: keycloak
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
refreshInterval: "0"
|
||||||
|
target:
|
||||||
|
name: auth-generic-oauth-secret
|
||||||
|
template:
|
||||||
|
engineVersion: v2
|
||||||
|
data:
|
||||||
|
client_secret: "{{.GRAFANA_CLIENT_SECRET}}"
|
||||||
|
data:
|
||||||
|
- secretKey: GRAFANA_CLIENT_SECRET
|
||||||
|
remoteRef:
|
||||||
|
key: keycloak-clients
|
||||||
|
property: GRAFANA_CLIENT_SECRET
|
|
@ -15,6 +15,12 @@ spec:
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
- ServerSideApply=true # do not copy metdata, since (because of its large size) it can lead to sync failure
|
- ServerSideApply=true # do not copy metdata, since (because of its large size) it can lead to sync failure
|
||||||
|
retry:
|
||||||
|
limit: -1
|
||||||
|
backoff:
|
||||||
|
duration: 15s
|
||||||
|
factor: 1
|
||||||
|
maxDuration: 15s
|
||||||
destination:
|
destination:
|
||||||
name: in-cluster
|
name: in-cluster
|
||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
|
@ -25,6 +31,6 @@ spec:
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/monitoring/kube-prometheus/values.yaml
|
- $values/stacks/monitoring/kube-prometheus/values.yaml
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
||||||
|
|
|
@ -110,12 +110,12 @@ data:
|
||||||
"uid": "P8E80F9AEF21F6940"
|
"uid": "P8E80F9AEF21F6940"
|
||||||
},
|
},
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"expr": "{container=\"promtail\"} |= ``",
|
"expr": "{container=\"alloy\"} |= ``",
|
||||||
"queryType": "range",
|
"queryType": "range",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Logs: Container promtail",
|
"title": "Logs: Container alloy",
|
||||||
"type": "logs"
|
"type": "logs"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,32 @@ grafana:
|
||||||
domain: {{{ .Env.DOMAIN }}}
|
domain: {{{ .Env.DOMAIN }}}
|
||||||
root_url: "%(protocol)s://%(domain)s/grafana"
|
root_url: "%(protocol)s://%(domain)s/grafana"
|
||||||
serve_from_sub_path: true
|
serve_from_sub_path: true
|
||||||
|
auth:
|
||||||
|
disable_login: true
|
||||||
|
disable_login_form: true
|
||||||
|
auth.generic_oauth:
|
||||||
|
enabled: true
|
||||||
|
name: Keycloak-OAuth
|
||||||
|
allow_sign_up: true
|
||||||
|
use_refresh_token: true
|
||||||
|
client_id: grafana
|
||||||
|
client_secret: $__file{/etc/secrets/auth_generic_oauth/client_secret}
|
||||||
|
scopes: openid email profile offline_access roles
|
||||||
|
email_attribute_path: email
|
||||||
|
login_attribute_path: username
|
||||||
|
name_attribute_path: full_name
|
||||||
|
auth_url: https://{{{ .Env.DOMAIN }}}/keycloak/realms/cnoe/protocol/openid-connect/auth
|
||||||
|
token_url: https://{{{ .Env.DOMAIN }}}/keycloak/realms/cnoe/protocol/openid-connect/token
|
||||||
|
api_url: https://{{{ .Env.DOMAIN }}}/keycloak/realms/cnoe/protocol/openid-connect/userinfo
|
||||||
|
redirect_uri: http://{{{ .Env.DOMAIN }}}/grafana/login/generic_oauth
|
||||||
|
role_attribute_path: "contains(groups[*], 'admin') && 'Admin' || contains(groups[*], 'editor') && 'Editor' || 'Viewer'"
|
||||||
|
|
||||||
|
extraSecretMounts:
|
||||||
|
- name: auth-generic-oauth-secret-mount
|
||||||
|
secretName: auth-generic-oauth-secret
|
||||||
|
defaultMode: 0440
|
||||||
|
mountPath: /etc/secrets/auth_generic_oauth
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
serviceMonitor:
|
serviceMonitor:
|
||||||
# If true, a ServiceMonitor CRD is created for a prometheus operator https://github.com/coreos/prometheus-operator
|
# If true, a ServiceMonitor CRD is created for a prometheus operator https://github.com/coreos/prometheus-operator
|
||||||
|
|
|
@ -24,7 +24,7 @@ spec:
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/monitoring/loki/values.yaml
|
- $values/stacks/monitoring/loki/values.yaml
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
||||||
|
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
# -- Overrides the chart's name
|
|
||||||
nameOverride: null
|
|
||||||
|
|
||||||
# -- Overrides the chart's computed fullname
|
|
||||||
fullnameOverride: null
|
|
||||||
|
|
||||||
global:
|
|
||||||
# -- Allow parent charts to override registry hostname
|
|
||||||
imageRegistry: ""
|
|
||||||
# -- Allow parent charts to override registry credentials
|
|
||||||
imagePullSecrets: []
|
|
||||||
|
|
||||||
daemonset:
|
|
||||||
# -- Deploys Promtail as a DaemonSet
|
|
||||||
enabled: true
|
|
||||||
autoscaling:
|
|
||||||
# -- Creates a VerticalPodAutoscaler for the daemonset
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
deployment:
|
|
||||||
# -- Deploys Promtail as a Deployment
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
config:
|
|
||||||
enabled: true
|
|
||||||
logLevel: info
|
|
||||||
logFormat: logfmt
|
|
||||||
serverPort: 3101
|
|
||||||
clients:
|
|
||||||
- url: http://loki-loki-distributed-gateway/loki/api/v1/push
|
|
||||||
scrape_configs:
|
|
||||||
- job_name: authlog
|
|
||||||
static_configs:
|
|
||||||
- targets:
|
|
||||||
- authlog
|
|
||||||
labels:
|
|
||||||
job: authlog
|
|
||||||
__path__: /logs/auth.log
|
|
||||||
- job_name: syslog
|
|
||||||
static_configs:
|
|
||||||
- targets:
|
|
||||||
- syslog
|
|
||||||
labels:
|
|
||||||
job: syslog
|
|
||||||
__path__: /logs/syslog
|
|
|
@ -10,7 +10,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/ref-implementation/argo-workflows/manifests/dev"
|
path: "stacks/ref-implementation/argo-workflows/manifests/dev"
|
||||||
destination:
|
destination:
|
||||||
|
@ -23,3 +23,7 @@ spec:
|
||||||
selfHeal: true
|
selfHeal: true
|
||||||
retry:
|
retry:
|
||||||
limit: -1
|
limit: -1
|
||||||
|
backoff:
|
||||||
|
duration: 15s
|
||||||
|
factor: 1
|
||||||
|
maxDuration: 15s
|
||||||
|
|
|
@ -10,7 +10,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/ref-implementation/backstage-templates/entities"
|
path: "stacks/ref-implementation/backstage-templates/entities"
|
||||||
directory:
|
directory:
|
||||||
|
|
|
@ -20,7 +20,7 @@ metadata:
|
||||||
backstage.io/kubernetes-namespace: default
|
backstage.io/kubernetes-namespace: default
|
||||||
argocd/app-name: ${{values.name | dump}}
|
argocd/app-name: ${{values.name | dump}}
|
||||||
links:
|
links:
|
||||||
- url: https://gitea.{{{ .Env.DOMAIN }}}:443
|
- url: https://{{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
title: Repo URL
|
title: Repo URL
|
||||||
icon: github
|
icon: github
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -100,7 +100,7 @@ spec:
|
||||||
input:
|
input:
|
||||||
description: This is an example app
|
description: This is an example app
|
||||||
# Hard coded value for this demo purposes only.
|
# Hard coded value for this demo purposes only.
|
||||||
repoUrl: gitea.{{{ .Env.DOMAIN }}}:443/?repo=${{parameters.name}}
|
repoUrl: {{{ .Env.DOMAIN_GITEA }}}:443/?repo=${{parameters.name}}
|
||||||
defaultBranch: main
|
defaultBranch: main
|
||||||
- id: create-argocd-app
|
- id: create-argocd-app
|
||||||
name: Create ArgoCD App
|
name: Create ArgoCD App
|
||||||
|
@ -111,7 +111,7 @@ spec:
|
||||||
argoInstance: in-cluster
|
argoInstance: in-cluster
|
||||||
projectName: default
|
projectName: default
|
||||||
# necessary until we generate our own cert
|
# necessary until we generate our own cert
|
||||||
repoUrl: https://gitea.{{{ .Env.DOMAIN }}}:443/giteaAdmin/${{parameters.name}}
|
repoUrl: https://{{{ .Env.DOMAIN_GITEA }}}:443/giteaAdmin/${{parameters.name}}
|
||||||
path: "kustomize/base"
|
path: "kustomize/base"
|
||||||
- id: register
|
- id: register
|
||||||
name: Register
|
name: Register
|
||||||
|
|
|
@ -14,7 +14,7 @@ metadata:
|
||||||
apache-spark.cnoe.io/label-selector: env=dev,entity-id=${{values.name}}
|
apache-spark.cnoe.io/label-selector: env=dev,entity-id=${{values.name}}
|
||||||
apache-spark.cnoe.io/cluster-name: local
|
apache-spark.cnoe.io/cluster-name: local
|
||||||
links:
|
links:
|
||||||
- url: https://gitea.{{{ .Env.DOMAIN }}}:443
|
- url: https://{{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
title: Repo URL
|
title: Repo URL
|
||||||
icon: github
|
icon: github
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -35,7 +35,7 @@ spec:
|
||||||
input:
|
input:
|
||||||
description: This is an example app
|
description: This is an example app
|
||||||
# Hard coded value for this demo purposes only.
|
# Hard coded value for this demo purposes only.
|
||||||
repoUrl: gitea.{{{ .Env.DOMAIN }}}:443/?repo=${{parameters.name}}
|
repoUrl: {{{ .Env.DOMAIN_GITEA }}}:443/?repo=${{parameters.name}}
|
||||||
defaultBranch: main
|
defaultBranch: main
|
||||||
- id: create-argocd-app
|
- id: create-argocd-app
|
||||||
name: Create ArgoCD App
|
name: Create ArgoCD App
|
||||||
|
@ -46,7 +46,7 @@ spec:
|
||||||
argoInstance: in-cluster
|
argoInstance: in-cluster
|
||||||
projectName: default
|
projectName: default
|
||||||
# necessary until we generate our own cert
|
# necessary until we generate our own cert
|
||||||
repoUrl: https://gitea.{{{ .Env.DOMAIN }}}:443/giteaAdmin/${{parameters.name}}
|
repoUrl: https://{{{ .Env.DOMAIN_GITEA }}}:443/giteaAdmin/${{parameters.name}}
|
||||||
path: "manifests"
|
path: "manifests"
|
||||||
- id: register
|
- id: register
|
||||||
name: Register
|
name: Register
|
||||||
|
|
|
@ -10,7 +10,7 @@ metadata:
|
||||||
backstage.io/kubernetes-namespace: default
|
backstage.io/kubernetes-namespace: default
|
||||||
argocd/app-name: ${{values.name | dump}}
|
argocd/app-name: ${{values.name | dump}}
|
||||||
links:
|
links:
|
||||||
- url: https://gitea.{{{ .Env.DOMAIN }}}:443
|
- url: https://{{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
title: Repo URL
|
title: Repo URL
|
||||||
icon: github
|
icon: github
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -31,7 +31,7 @@ spec:
|
||||||
input:
|
input:
|
||||||
description: This is an example app
|
description: This is an example app
|
||||||
# Hard coded value for this demo purposes only.
|
# Hard coded value for this demo purposes only.
|
||||||
repoUrl: gitea.{{{ .Env.DOMAIN }}}:443/?repo=${{parameters.name}}
|
repoUrl: {{{ .Env.DOMAIN_GITEA }}}:443/?repo=${{parameters.name}}
|
||||||
defaultBranch: main
|
defaultBranch: main
|
||||||
- id: create-argocd-app
|
- id: create-argocd-app
|
||||||
name: Create ArgoCD App
|
name: Create ArgoCD App
|
||||||
|
@ -42,7 +42,7 @@ spec:
|
||||||
argoInstance: in-cluster
|
argoInstance: in-cluster
|
||||||
projectName: default
|
projectName: default
|
||||||
# necessary until we generate our own cert
|
# necessary until we generate our own cert
|
||||||
repoUrl: https://gitea.{{{ .Env.DOMAIN }}}:443/giteaAdmin/${{parameters.name}}
|
repoUrl: https://{{{ .Env.DOMAIN_GITEA }}}:443/giteaAdmin/${{parameters.name}}
|
||||||
path: "manifests"
|
path: "manifests"
|
||||||
- id: register
|
- id: register
|
||||||
name: Register
|
name: Register
|
||||||
|
|
|
@ -9,7 +9,7 @@ metadata:
|
||||||
backstage.io/kubernetes-label-selector: 'entity-id=${{ values.name }}'
|
backstage.io/kubernetes-label-selector: 'entity-id=${{ values.name }}'
|
||||||
backstage.io/kubernetes-namespace: gitea
|
backstage.io/kubernetes-namespace: gitea
|
||||||
links:
|
links:
|
||||||
- url: https://gitea.{{{ .Env.DOMAIN }}}:443
|
- url: https://{{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
title: Repo URL
|
title: Repo URL
|
||||||
icon: git
|
icon: git
|
||||||
spec:
|
spec:
|
||||||
|
@ -26,7 +26,7 @@ metadata:
|
||||||
annotations:
|
annotations:
|
||||||
backstage.io/techdocs-ref: dir:.
|
backstage.io/techdocs-ref: dir:.
|
||||||
links:
|
links:
|
||||||
- url: https://gitea.{{{ .Env.DOMAIN }}}:443
|
- url: https://{{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
title: Gitea Repo
|
title: Gitea Repo
|
||||||
icon: git
|
icon: git
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -33,7 +33,7 @@ spec:
|
||||||
name: Publish to Gitea
|
name: Publish to Gitea
|
||||||
action: publish:gitea
|
action: publish:gitea
|
||||||
input:
|
input:
|
||||||
repoUrl: gitea.{{{ .Env.DOMAIN }}}:443/?repo=${{parameters.name}}
|
repoUrl: {{{ .Env.DOMAIN_GITEA }}}:443/?repo=${{parameters.name}}
|
||||||
description: This is the repository for ${{ parameters.name }}
|
description: This is the repository for ${{ parameters.name }}
|
||||||
sourcePath: ./skeleton
|
sourcePath: ./skeleton
|
||||||
defaultBranch: main
|
defaultBranch: main
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
# This workflow will build a Java project with Gradle, and cache/restore any dependencies to improve the workflow execution time
|
|
||||||
# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle
|
|
||||||
|
|
||||||
name: Java CI with Gradle
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
java: [ '17' ]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Set up JDK {% raw %}${{matrix.java}}{% endraw %}
|
|
||||||
uses: https://github.com/actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '{% raw %}${{matrix.java}}{% endraw %}'
|
|
||||||
distribution: 'adopt'
|
|
||||||
cache: maven
|
|
||||||
- name: Setup Gradle
|
|
||||||
uses: https://github.com/gradle/actions/setup-gradle@v4
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew build
|
|
||||||
|
|
|
@ -28,12 +28,12 @@ jobs:
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
cache: maven
|
cache: maven
|
||||||
- name: Build with Maven Wrapper
|
- name: Build with Maven Wrapper
|
||||||
run: ./mvnw -B verify
|
run: ./mvnw -B -DskipTests verify
|
||||||
- name: Build image
|
- name: Build image
|
||||||
#run: ./mvnw spring-boot:build-image # the original image build
|
#run: ./mvnw spring-boot:build-image # the original image build
|
||||||
run: |
|
run: |
|
||||||
export CONTAINER_REPO=$(echo {% raw %}${{ env.GITHUB_REPOSITORY }}{% endraw %} | tr '[:upper:]' '[:lower:]')
|
export CONTAINER_REPO=$(echo {% raw %}${{ env.GITHUB_REPOSITORY }}{% endraw %} | tr '[:upper:]' '[:lower:]')
|
||||||
./mvnw com.google.cloud.tools:jib-maven-plugin:3.4.4:build -Djib.allowInsecureRegistries=true -Dimage=gitea.{{{ .Env.DOMAIN }}}/${CONTAINER_REPO}:latest -Djib.to.auth.username={% raw %}${{ github.actor }}{% endraw %} -Djib.to.auth.password={% raw %}${{ secrets.PACKAGES_TOKEN }}{% endraw %}
|
./mvnw com.google.cloud.tools:jib-maven-plugin:3.4.4:build -Djib.allowInsecureRegistries=true -Dimage={{{ .Env.DOMAIN_GITEA }}}/${CONTAINER_REPO}:latest -Djib.to.auth.username={% raw %}${{ secrets.PACKAGES_USER }}{% endraw %} -Djib.to.auth.password={% raw %}${{ secrets.PACKAGES_TOKEN }}{% endraw %} -Djib.from.platforms=linux/arm64,linux/amd64
|
||||||
- name: Build image as tar
|
- name: Build image as tar
|
||||||
run: |
|
run: |
|
||||||
./mvnw com.google.cloud.tools:jib-maven-plugin:3.4.4:buildTar -Djib.allowInsecureRegistries=true
|
./mvnw com.google.cloud.tools:jib-maven-plugin:3.4.4:buildTar -Djib.allowInsecureRegistries=true
|
||||||
|
@ -57,7 +57,11 @@ jobs:
|
||||||
NODE_TLS_REJECT_UNAUTHORIZED: 0 # This is necessary due to self signed certs for forgejo, proper setups can skip this
|
NODE_TLS_REJECT_UNAUTHORIZED: 0 # This is necessary due to self signed certs for forgejo, proper setups can skip this
|
||||||
- name: install trivy from deb package
|
- name: install trivy from deb package
|
||||||
run: |
|
run: |
|
||||||
wget -O trivy.deb https://github.com/aquasecurity/trivy/releases/download/v0.58.0/trivy_0.58.0_Linux-64bit.deb
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||||
|
wget -O trivy.deb https://github.com/aquasecurity/trivy/releases/download/v0.58.0/trivy_0.58.0_Linux-64bit.deb
|
||||||
|
else
|
||||||
|
wget -O trivy.deb https://github.com/aquasecurity/trivy/releases/download/v0.58.0/trivy_0.58.0_Linux-ARM64.deb
|
||||||
|
fi
|
||||||
DEBIAN_FRONTEND=noninteractive dpkg -i trivy.deb
|
DEBIAN_FRONTEND=noninteractive dpkg -i trivy.deb
|
||||||
- name: scan the image
|
- name: scan the image
|
||||||
run: trivy image --input jib-image.tar
|
run: trivy image --input jib-image.tar
|
||||||
|
|
|
@ -9,7 +9,7 @@ metadata:
|
||||||
backstage.io/kubernetes-label-selector: 'entity-id=${{ values.name }}'
|
backstage.io/kubernetes-label-selector: 'entity-id=${{ values.name }}'
|
||||||
backstage.io/kubernetes-namespace: gitea
|
backstage.io/kubernetes-namespace: gitea
|
||||||
links:
|
links:
|
||||||
- url: https://gitea.{{{ .Env.DOMAIN }}}:443
|
- url: https://{{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
title: Repo URL
|
title: Repo URL
|
||||||
icon: git
|
icon: git
|
||||||
spec:
|
spec:
|
||||||
|
@ -26,7 +26,7 @@ metadata:
|
||||||
annotations:
|
annotations:
|
||||||
backstage.io/techdocs-ref: dir:.
|
backstage.io/techdocs-ref: dir:.
|
||||||
links:
|
links:
|
||||||
- url: https://gitea.{{{ .Env.DOMAIN }}}:443
|
- url: https://{{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
title: Gitea Repo
|
title: Gitea Repo
|
||||||
icon: git
|
icon: git
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -58,7 +58,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: workload
|
- name: workload
|
||||||
image: gitea.{{{ .Env.DOMAIN }}}/giteaadmin/${{ values.name }}
|
image: {{{ .Env.DOMAIN_GITEA }}}/giteaadmin/${{ values.name }}
|
||||||
env:
|
env:
|
||||||
- name: SPRING_PROFILES_ACTIVE
|
- name: SPRING_PROFILES_ACTIVE
|
||||||
value: postgres
|
value: postgres
|
||||||
|
|
|
@ -50,7 +50,7 @@ spec:
|
||||||
name: Publish to Gitea
|
name: Publish to Gitea
|
||||||
action: publish:gitea
|
action: publish:gitea
|
||||||
input:
|
input:
|
||||||
repoUrl: gitea.{{{ .Env.DOMAIN }}}:443/?repo=${{parameters.name}}
|
repoUrl: {{{ .Env.DOMAIN_GITEA }}}:443/?repo=${{parameters.name}}
|
||||||
description: This is the repository for ${{ parameters.name }}
|
description: This is the repository for ${{ parameters.name }}
|
||||||
sourcePath: ./
|
sourcePath: ./
|
||||||
defaultBranch: main
|
defaultBranch: main
|
||||||
|
@ -64,7 +64,7 @@ spec:
|
||||||
argoInstance: in-cluster
|
argoInstance: in-cluster
|
||||||
projectName: default
|
projectName: default
|
||||||
# necessary until we generate our own cert
|
# necessary until we generate our own cert
|
||||||
repoUrl: https://gitea.{{{ .Env.DOMAIN }}}:443/giteaAdmin/${{parameters.name}}
|
repoUrl: https://{{{ .Env.DOMAIN_GITEA }}}:443/giteaAdmin/${{parameters.name}}
|
||||||
path: "k8s"
|
path: "k8s"
|
||||||
|
|
||||||
- id: register
|
- id: register
|
||||||
|
|
|
@ -10,7 +10,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/ref-implementation/backstage/manifests"
|
path: "stacks/ref-implementation/backstage/manifests"
|
||||||
destination:
|
destination:
|
||||||
|
@ -23,3 +23,7 @@ spec:
|
||||||
selfHeal: true
|
selfHeal: true
|
||||||
retry:
|
retry:
|
||||||
limit: -1
|
limit: -1
|
||||||
|
backoff:
|
||||||
|
duration: 15s
|
||||||
|
factor: 1
|
||||||
|
maxDuration: 15s
|
||||||
|
|
|
@ -106,12 +106,12 @@ data:
|
||||||
|
|
||||||
integrations:
|
integrations:
|
||||||
gitea:
|
gitea:
|
||||||
- baseUrl: https://gitea.{{{ .Env.DOMAIN }}}:443
|
- baseUrl: https://{{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
host: gitea.{{{ .Env.DOMAIN }}}:443
|
host: {{{ .Env.DOMAIN_GITEA }}}:443
|
||||||
username: ${GITEA_USERNAME}
|
username: ${GITEA_USERNAME}
|
||||||
password: ${GITEA_PASSWORD}
|
password: ${GITEA_PASSWORD}
|
||||||
- baseUrl: https://gitea.{{{ .Env.DOMAIN }}}
|
- baseUrl: https://{{{ .Env.DOMAIN_GITEA }}}
|
||||||
host: gitea.{{{ .Env.DOMAIN }}}
|
host: {{{ .Env.DOMAIN_GITEA }}}
|
||||||
username: ${GITEA_USERNAME}
|
username: ${GITEA_USERNAME}
|
||||||
password: ${GITEA_PASSWORD}
|
password: ${GITEA_PASSWORD}
|
||||||
- baseUrl: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live
|
- baseUrl: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live
|
||||||
|
@ -167,7 +167,7 @@ data:
|
||||||
locations:
|
locations:
|
||||||
# Examples from a public GitHub repository.
|
# Examples from a public GitHub repository.
|
||||||
- type: url
|
- type: url
|
||||||
target: https://gitea.{{{ .Env.DOMAIN }}}:443/giteaAdmin/edfbuilder/raw/branch/main/stacks/ref-implementation/backstage-templates/entities/catalog-info.yaml
|
target: https://{{{ .Env.DOMAIN_GITEA }}}:443/giteaAdmin/edfbuilder/raw/branch/main/stacks/ref-implementation/backstage-templates/entities/catalog-info.yaml
|
||||||
rules:
|
rules:
|
||||||
- allow: [Component, System, API, Resource, Location, Template, User, Group]
|
- allow: [Component, System, API, Resource, Location, Template, User, Group]
|
||||||
kubernetes:
|
kubernetes:
|
||||||
|
@ -255,6 +255,8 @@ spec:
|
||||||
value: debug
|
value: debug
|
||||||
- name: NODE_TLS_REJECT_UNAUTHORIZED
|
- name: NODE_TLS_REJECT_UNAUTHORIZED
|
||||||
value: "0"
|
value: "0"
|
||||||
|
- name: NODE_OPTIONS
|
||||||
|
value: "--no-node-snapshot"
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: backstage-env-vars
|
name: backstage-env-vars
|
||||||
|
@ -262,7 +264,8 @@ spec:
|
||||||
name: gitea-credentials
|
name: gitea-credentials
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: argocd-credentials
|
name: argocd-credentials
|
||||||
image: ghcr.io/cnoe-io/backstage-app:9232d633b2698fffa6d0a73b715e06640d170162
|
image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/backstage-edp:1.1.0
|
||||||
|
imagePullPolicy: Always
|
||||||
name: backstage
|
name: backstage
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 7007
|
- containerPort: 7007
|
||||||
|
@ -386,7 +389,7 @@ spec:
|
||||||
KEYCLOAK_NAME_METADATA: https://{{{ .Env.DOMAIN }}}:443/keycloak/realms/cnoe/.well-known/openid-configuration
|
KEYCLOAK_NAME_METADATA: https://{{{ .Env.DOMAIN }}}:443/keycloak/realms/cnoe/.well-known/openid-configuration
|
||||||
KEYCLOAK_CLIENT_SECRET: "{{.BACKSTAGE_CLIENT_SECRET}}"
|
KEYCLOAK_CLIENT_SECRET: "{{.BACKSTAGE_CLIENT_SECRET}}"
|
||||||
ARGOCD_AUTH_TOKEN: "argocd.token={{.ARGOCD_SESSION_TOKEN}}"
|
ARGOCD_AUTH_TOKEN: "argocd.token={{.ARGOCD_SESSION_TOKEN}}"
|
||||||
ARGO_CD_URL: 'https://argocd-server.argocd.svc.cluster.local/api/v1/'
|
ARGO_CD_URL: 'https://{{{ .Env.DOMAIN }}}/argocd/api/v1/'
|
||||||
data:
|
data:
|
||||||
- secretKey: ARGOCD_SESSION_TOKEN
|
- secretKey: ARGOCD_SESSION_TOKEN
|
||||||
remoteRef:
|
remoteRef:
|
||||||
|
|
|
@ -12,7 +12,7 @@ spec:
|
||||||
namespace: external-secrets
|
namespace: external-secrets
|
||||||
server: "https://kubernetes.default.svc"
|
server: "https://kubernetes.default.svc"
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/ref-implementation/external-secrets/manifests"
|
path: "stacks/ref-implementation/external-secrets/manifests"
|
||||||
project: default
|
project: default
|
||||||
|
|
|
@ -10,7 +10,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/ref-implementation/fibonacci-app"
|
path: "stacks/ref-implementation/fibonacci-app"
|
||||||
destination:
|
destination:
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: forgejo-runner
|
|
||||||
namespace: argocd
|
|
||||||
labels:
|
|
||||||
env: dev
|
|
||||||
finalizers:
|
|
||||||
- resources-finalizer.argocd.argoproj.io
|
|
||||||
spec:
|
|
||||||
project: default
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
selfHeal: true
|
|
||||||
syncOptions:
|
|
||||||
- CreateNamespace=true
|
|
||||||
destination:
|
|
||||||
name: in-cluster
|
|
||||||
namespace: gitea
|
|
||||||
sources:
|
|
||||||
- repoURL: https://forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/DevFW-CICD/forgejo-runner.git
|
|
||||||
path: forgejo-runner
|
|
||||||
targetRevision: HEAD
|
|
||||||
helm:
|
|
||||||
valueFiles:
|
|
||||||
- $values/stacks/ref-implementation/forgejo-runner/values.yaml
|
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
|
||||||
targetRevision: HEAD
|
|
||||||
ref: values
|
|
|
@ -1,8 +0,0 @@
|
||||||
replicaCount: 2
|
|
||||||
|
|
||||||
image:
|
|
||||||
repository: code.forgejo.org/forgejo/runner
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
tag: "6.0.1"
|
|
||||||
|
|
||||||
forgejoUrl: http://forgejo-http.gitea.svc.cluster.local:3000
|
|
|
@ -12,7 +12,7 @@ spec:
|
||||||
namespace: keycloak
|
namespace: keycloak
|
||||||
server: "https://kubernetes.default.svc"
|
server: "https://kubernetes.default.svc"
|
||||||
source:
|
source:
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
path: "stacks/ref-implementation/keycloak/manifests"
|
path: "stacks/ref-implementation/keycloak/manifests"
|
||||||
project: default
|
project: default
|
||||||
|
|
|
@ -100,11 +100,11 @@ data:
|
||||||
user-user1.json: |
|
user-user1.json: |
|
||||||
{
|
{
|
||||||
"username": "user1",
|
"username": "user1",
|
||||||
"email": "",
|
"email": "user1@user.de",
|
||||||
"firstName": "user",
|
"firstName": "user",
|
||||||
"lastName": "one",
|
"lastName": "one",
|
||||||
"requiredActions": [],
|
"requiredActions": [],
|
||||||
"emailVerified": false,
|
"emailVerified": true,
|
||||||
"groups": [
|
"groups": [
|
||||||
"/admin"
|
"/admin"
|
||||||
],
|
],
|
||||||
|
@ -113,11 +113,11 @@ data:
|
||||||
user-user2.json: |
|
user-user2.json: |
|
||||||
{
|
{
|
||||||
"username": "user2",
|
"username": "user2",
|
||||||
"email": "",
|
"email": "user2@user.de",
|
||||||
"firstName": "user",
|
"firstName": "user",
|
||||||
"lastName": "two",
|
"lastName": "two",
|
||||||
"requiredActions": [],
|
"requiredActions": [],
|
||||||
"emailVerified": false,
|
"emailVerified": true,
|
||||||
"groups": [
|
"groups": [
|
||||||
"/base-user"
|
"/base-user"
|
||||||
],
|
],
|
||||||
|
@ -181,6 +181,102 @@ data:
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
grafana-client-payload.json: |
|
||||||
|
{
|
||||||
|
"clientId": "grafana",
|
||||||
|
"name": "Grafana Client",
|
||||||
|
"description": "Used for Grafana SSO",
|
||||||
|
"rootUrl": "https://{{{ .Env.DOMAIN }}}/grafana",
|
||||||
|
"adminUrl": "https://{{{ .Env.DOMAIN }}}/grafana",
|
||||||
|
"baseUrl": "https://{{{ .Env.DOMAIN }}}/grafana",
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"redirectUris": [
|
||||||
|
"http://{{{ .Env.DOMAIN }}}/grafana/*"
|
||||||
|
],
|
||||||
|
"webOrigins": [
|
||||||
|
"https://{{{ .Env.DOMAIN }}}/grafana"
|
||||||
|
],
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": true,
|
||||||
|
"serviceAccountsEnabled": false,
|
||||||
|
"publicClient": false,
|
||||||
|
"frontchannelLogout": true,
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"attributes": {
|
||||||
|
"saml_idp_initiated_sso_url_name": "",
|
||||||
|
"oidc.ciba.grant.enabled": "false",
|
||||||
|
"oauth2.device.authorization.grant.enabled": "false"
|
||||||
|
},
|
||||||
|
"defaultClientScopes": [
|
||||||
|
"web-origins",
|
||||||
|
"acr",
|
||||||
|
"offline_access",
|
||||||
|
"roles",
|
||||||
|
"profile",
|
||||||
|
"groups",
|
||||||
|
"email"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
argocd-client-payload.json: |
|
||||||
|
{
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"clientId": "argocd",
|
||||||
|
"name": "ArgoCD Client",
|
||||||
|
"description": "Used for ArgoCD SSO",
|
||||||
|
"publicClient": false,
|
||||||
|
"authorizationServicesEnabled": false,
|
||||||
|
"serviceAccountsEnabled": false,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": true,
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"frontchannelLogout": true,
|
||||||
|
"attributes": {
|
||||||
|
"saml_idp_initiated_sso_url_name": "",
|
||||||
|
"oauth2.device.authorization.grant.enabled": false,
|
||||||
|
"oidc.ciba.grant.enabled": false
|
||||||
|
},
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"rootUrl": "",
|
||||||
|
"baseUrl": "",
|
||||||
|
"redirectUris": [
|
||||||
|
"https://{{{ .Env.DOMAIN }}}/*"
|
||||||
|
],
|
||||||
|
"webOrigins": [
|
||||||
|
"/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
forgejo-client-payload.json: |
|
||||||
|
{
|
||||||
|
"protocol": "openid-connect",
|
||||||
|
"clientId": "forgejo",
|
||||||
|
"name": "Forgejo Client",
|
||||||
|
"description": "Used for Forgejo SSO",
|
||||||
|
"publicClient": false,
|
||||||
|
"authorizationServicesEnabled": false,
|
||||||
|
"serviceAccountsEnabled": false,
|
||||||
|
"implicitFlowEnabled": false,
|
||||||
|
"directAccessGrantsEnabled": true,
|
||||||
|
"standardFlowEnabled": true,
|
||||||
|
"frontchannelLogout": true,
|
||||||
|
"attributes": {
|
||||||
|
"saml_idp_initiated_sso_url_name": "",
|
||||||
|
"oauth2.device.authorization.grant.enabled": false,
|
||||||
|
"oidc.ciba.grant.enabled": false
|
||||||
|
},
|
||||||
|
"alwaysDisplayInConsole": false,
|
||||||
|
"rootUrl": "",
|
||||||
|
"baseUrl": "",
|
||||||
|
"redirectUris": [
|
||||||
|
"https://{{{ .Env.DOMAIN_GITEA }}}/*"
|
||||||
|
],
|
||||||
|
"webOrigins": [
|
||||||
|
"/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
|
@ -247,7 +343,11 @@ spec:
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
curl -sS -LO "https://dl.k8s.io/release/v1.28.3//bin/linux/amd64/kubectl"
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||||
|
curl -sS -LO "https://dl.k8s.io/release/v1.28.3//bin/linux/amd64/kubectl"
|
||||||
|
else
|
||||||
|
curl -sS -LO "https://dl.k8s.io/release/v1.28.3//bin/linux/arm64/kubectl"
|
||||||
|
fi
|
||||||
chmod +x kubectl
|
chmod +x kubectl
|
||||||
|
|
||||||
echo "creating cnoe realm and groups"
|
echo "creating cnoe realm and groups"
|
||||||
|
@ -273,7 +373,7 @@ spec:
|
||||||
${KEYCLOAK_URL}/admin/realms/cnoe/groups
|
${KEYCLOAK_URL}/admin/realms/cnoe/groups
|
||||||
|
|
||||||
# Create scope mapper
|
# Create scope mapper
|
||||||
echo 'adding group claim to tokens'
|
echo 'adding group claim to tokens'
|
||||||
CLIENT_SCOPE_GROUPS_ID=$(curl -sS -H "Content-Type: application/json" -H "Authorization: bearer ${KEYCLOAK_TOKEN}" -X GET ${KEYCLOAK_URL}/admin/realms/cnoe/client-scopes | jq -e -r '.[] | select(.name == "groups") | .id')
|
CLIENT_SCOPE_GROUPS_ID=$(curl -sS -H "Content-Type: application/json" -H "Authorization: bearer ${KEYCLOAK_TOKEN}" -X GET ${KEYCLOAK_URL}/admin/realms/cnoe/client-scopes | jq -e -r '.[] | select(.name == "groups") | .id')
|
||||||
|
|
||||||
curl -sS -H "Content-Type: application/json" \
|
curl -sS -H "Content-Type: application/json" \
|
||||||
|
@ -313,8 +413,8 @@ spec:
|
||||||
echo "creating Argo Workflows client"
|
echo "creating Argo Workflows client"
|
||||||
curl -sS -H "Content-Type: application/json" \
|
curl -sS -H "Content-Type: application/json" \
|
||||||
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
-X POST --data @/var/config/argo-client-payload.json \
|
-X POST --data @/var/config/argo-client-payload.json \
|
||||||
${KEYCLOAK_URL}/admin/realms/cnoe/clients
|
${KEYCLOAK_URL}/admin/realms/cnoe/clients
|
||||||
|
|
||||||
CLIENT_ID=$(curl -sS -H "Content-Type: application/json" \
|
CLIENT_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
@ -328,29 +428,100 @@ spec:
|
||||||
-X PUT ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID}/default-client-scopes/${CLIENT_SCOPE_GROUPS_ID}
|
-X PUT ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID}/default-client-scopes/${CLIENT_SCOPE_GROUPS_ID}
|
||||||
|
|
||||||
ARGO_WORKFLOWS_CLIENT_SECRET=$(curl -sS -H "Content-Type: application/json" \
|
ARGO_WORKFLOWS_CLIENT_SECRET=$(curl -sS -H "Content-Type: application/json" \
|
||||||
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID} | jq -e -r '.secret')
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID} | jq -e -r '.secret')
|
||||||
|
|
||||||
|
echo "creating Grafana client"
|
||||||
|
curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X POST --data @/var/config/grafana-client-payload.json \
|
||||||
|
${KEYCLOAK_URL}/admin/realms/cnoe/clients
|
||||||
|
|
||||||
|
CLIENT_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients | jq -e -r '.[] | select(.clientId == "grafana") | .id')
|
||||||
|
|
||||||
|
CLIENT_SCOPE_GROUPS_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/client-scopes | jq -e -r '.[] | select(.name == "groups") | .id')
|
||||||
|
|
||||||
|
curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X PUT ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID}/default-client-scopes/${CLIENT_SCOPE_GROUPS_ID}
|
||||||
|
|
||||||
|
GRAFANA_CLIENT_SECRET=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID} | jq -e -r '.secret')
|
||||||
|
|
||||||
echo "creating Backstage client"
|
echo "creating Backstage client"
|
||||||
curl -sS -H "Content-Type: application/json" \
|
curl -sS -H "Content-Type: application/json" \
|
||||||
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
-X POST --data @/var/config/backstage-client-payload.json \
|
-X POST --data @/var/config/backstage-client-payload.json \
|
||||||
${KEYCLOAK_URL}/admin/realms/cnoe/clients
|
${KEYCLOAK_URL}/admin/realms/cnoe/clients
|
||||||
|
|
||||||
CLIENT_ID=$(curl -sS -H "Content-Type: application/json" \
|
CLIENT_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients | jq -e -r '.[] | select(.clientId == "backstage") | .id')
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients | jq -e -r '.[] | select(.clientId == "backstage") | .id')
|
||||||
|
|
||||||
CLIENT_SCOPE_GROUPS_ID=$(curl -sS -H "Content-Type: application/json" -H "Authorization: bearer ${KEYCLOAK_TOKEN}" -X GET ${KEYCLOAK_URL}/admin/realms/cnoe/client-scopes | jq -e -r '.[] | select(.name == "groups") | .id')
|
CLIENT_SCOPE_GROUPS_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
curl -sS -H "Content-Type: application/json" -H "Authorization: bearer ${KEYCLOAK_TOKEN}" -X PUT ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID}/default-client-scopes/${CLIENT_SCOPE_GROUPS_ID}
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/client-scopes | jq -e -r '.[] | select(.name == "groups") | .id')
|
||||||
|
|
||||||
|
curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X PUT ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID}/default-client-scopes/${CLIENT_SCOPE_GROUPS_ID}
|
||||||
|
|
||||||
BACKSTAGE_CLIENT_SECRET=$(curl -sS -H "Content-Type: application/json" \
|
BACKSTAGE_CLIENT_SECRET=$(curl -sS -H "Content-Type: application/json" \
|
||||||
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID} | jq -e -r '.secret')
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID} | jq -e -r '.secret')
|
||||||
|
|
||||||
|
echo "creating ArgoCD client"
|
||||||
|
curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X POST --data @/var/config/argocd-client-payload.json \
|
||||||
|
${KEYCLOAK_URL}/admin/realms/cnoe/clients
|
||||||
|
|
||||||
|
CLIENT_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients | jq -e -r '.[] | select(.clientId == "argocd") | .id')
|
||||||
|
|
||||||
|
CLIENT_SCOPE_GROUPS_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/client-scopes | jq -e -r '.[] | select(.name == "groups") | .id')
|
||||||
|
|
||||||
|
curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X PUT ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID}/default-client-scopes/${CLIENT_SCOPE_GROUPS_ID}
|
||||||
|
|
||||||
|
ARGOCD_CLIENT_SECRET=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID} | jq -e -r '.secret')
|
||||||
|
|
||||||
|
echo "creating Forgejo client"
|
||||||
|
curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X POST --data @/var/config/forgejo-client-payload.json \
|
||||||
|
${KEYCLOAK_URL}/admin/realms/cnoe/clients
|
||||||
|
|
||||||
|
CLIENT_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients | jq -e -r '.[] | select(.clientId == "forgejo") | .id')
|
||||||
|
|
||||||
|
CLIENT_SCOPE_GROUPS_ID=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/client-scopes | jq -e -r '.[] | select(.name == "groups") | .id')
|
||||||
|
|
||||||
|
curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X PUT ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID}/default-client-scopes/${CLIENT_SCOPE_GROUPS_ID}
|
||||||
|
|
||||||
|
FORGEJO_CLIENT_SECRET=$(curl -sS -H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: bearer ${KEYCLOAK_TOKEN}" \
|
||||||
|
-X GET ${KEYCLOAK_URL}/admin/realms/cnoe/clients/${CLIENT_ID} | jq -e -r '.secret')
|
||||||
|
|
||||||
ARGOCD_PASSWORD=$(./kubectl -n argocd get secret argocd-initial-admin-secret -o go-template='{{.data.password | base64decode }}')
|
ARGOCD_PASSWORD=$(./kubectl -n argocd get secret argocd-initial-admin-secret -o go-template='{{.data.password | base64decode }}')
|
||||||
|
|
||||||
ARGOCD_SESSION_TOKEN=$(curl -k -sS http://argocd-server.argocd.svc.cluster.local:443/api/v1/session -H 'Content-Type: application/json' -d "{\"username\":\"admin\",\"password\":\"${ARGOCD_PASSWORD}\"}" | jq -r .token)
|
ARGOCD_SESSION_TOKEN=$(curl -sS https://{{{ .Env.DOMAIN }}}/argocd/api/v1/session -H 'Content-Type: application/json' -d "{\"username\":\"admin\",\"password\":\"${ARGOCD_PASSWORD}\"}" | jq -r .token)
|
||||||
|
|
||||||
echo \
|
echo \
|
||||||
"apiVersion: v1
|
"apiVersion: v1
|
||||||
|
@ -365,7 +536,12 @@ spec:
|
||||||
ARGOCD_SESSION_TOKEN: ${ARGOCD_SESSION_TOKEN}
|
ARGOCD_SESSION_TOKEN: ${ARGOCD_SESSION_TOKEN}
|
||||||
BACKSTAGE_CLIENT_SECRET: ${BACKSTAGE_CLIENT_SECRET}
|
BACKSTAGE_CLIENT_SECRET: ${BACKSTAGE_CLIENT_SECRET}
|
||||||
BACKSTAGE_CLIENT_ID: backstage
|
BACKSTAGE_CLIENT_ID: backstage
|
||||||
|
GRAFANA_CLIENT_SECRET: ${GRAFANA_CLIENT_SECRET}
|
||||||
|
GRAFANA_CLIENT_ID: grafana
|
||||||
|
ARGOCD_CLIENT_SECRET: ${ARGOCD_CLIENT_SECRET}
|
||||||
|
ARGOCD_CLIENT_ID: argocd
|
||||||
|
FORGEJO_CLIENT_SECRET: ${FORGEJO_CLIENT_SECRET}
|
||||||
|
FORGEJO_CLIENT_ID: forgejo
|
||||||
" > /tmp/secret.yaml
|
" > /tmp/secret.yaml
|
||||||
|
|
||||||
./kubectl apply -f /tmp/secret.yaml
|
./kubectl apply -f /tmp/secret.yaml
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
{{{ if eq .Env.CLUSTER_TYPE "kind" }}}
|
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: crossplane-providers
|
name: mailhog
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
labels:
|
labels:
|
||||||
env: dev
|
env: dev
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
spec:
|
spec:
|
||||||
project: default
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: "stacks/ref-implementation/mailhog"
|
||||||
|
destination:
|
||||||
|
server: "https://kubernetes.default.svc"
|
||||||
|
namespace: mailhog
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
automated:
|
|
||||||
selfHeal: true
|
|
||||||
syncOptions:
|
syncOptions:
|
||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
destination:
|
automated:
|
||||||
name: in-cluster
|
selfHeal: true
|
||||||
namespace: crossplane-system
|
retry:
|
||||||
source:
|
limit: -1
|
||||||
path: stacks/core/crossplane-providers
|
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
|
||||||
targetRevision: HEAD
|
|
||||||
{{{ end }}}
|
|
54
template/stacks/ref-implementation/mailhog/README.md
Normal file
54
template/stacks/ref-implementation/mailhog/README.md
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
# Mailhog
|
||||||
|
|
||||||
|
[MailHog is an email testing tool for developers](https://github.com/mailhog/MailHog).
|
||||||
|
|
||||||
|
## In cluster SMTP service
|
||||||
|
|
||||||
|
Ypu can send ESMTP emails in the cluster to `mailhog.mailhog.svc.cluster.local`, standard port `1025`, as defined in the service manifest:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mailhog
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: smtp
|
||||||
|
port: 1025
|
||||||
|
```
|
||||||
|
|
||||||
|
## Ingress
|
||||||
|
|
||||||
|
Mailhog offers both WebUi and API at `https://{{{ .Env.DOMAIN }}}/mailhog`.
|
||||||
|
|
||||||
|
The ingress definition is in `stacks/core/ingress-apps/mailhog.yaml` (BTW, why isn't this ingress file here in this folder ??) routing to the mailhog' service
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: {{{ .Env.DOMAIN }}}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
...
|
||||||
|
path: /mailhog
|
||||||
|
```
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
For usage of the API see https://github.com/mailhog/MailHog/blob/master/docs/APIv2.md
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl run busybox --rm -it --image=busybox -- /bin/sh
|
||||||
|
|
||||||
|
# inside bsybox
|
||||||
|
wget -O- http://mailhog.mailhog.svc.cluster.local:8025/mailhog
|
||||||
|
|
||||||
|
# check smtp port
|
||||||
|
nc -zv mailhog.mailhog.svc.cluster.local 1025
|
||||||
|
|
||||||
|
# send esmtp, first install swaks
|
||||||
|
swaks --to test@example.com --from test@example.com --server mailhog:1025 --data "Subject: Test-Mail\n\nDies ist eine Test-Mail."
|
||||||
|
```
|
33
template/stacks/ref-implementation/mailhog/deployment.yaml
Normal file
33
template/stacks/ref-implementation/mailhog/deployment.yaml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mailhog-deployment
|
||||||
|
namespace: mailhog
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mailhog
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mailhog
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mailhog
|
||||||
|
image: mailhog/mailhog
|
||||||
|
env:
|
||||||
|
- name: MH_UI_WEB_PATH # set this to same value as in ingress stacks/core/ingress-apps/mailhog.yaml
|
||||||
|
value: mailhog
|
||||||
|
ports:
|
||||||
|
- containerPort: 1025
|
||||||
|
name: smtp
|
||||||
|
- containerPort: 8025
|
||||||
|
name: http
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
13
template/stacks/ref-implementation/mailhog/service.yaml
Normal file
13
template/stacks/ref-implementation/mailhog/service.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mailhog
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mailhog
|
||||||
|
ports:
|
||||||
|
- name: smtp
|
||||||
|
port: 1025
|
||||||
|
- name: http
|
||||||
|
port: 8025
|
||||||
|
type: ClusterIP
|
|
@ -24,7 +24,7 @@ spec:
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- $values/stacks/ref-implementation/openbao/values.yaml
|
- $values/stacks/ref-implementation/openbao/values.yaml
|
||||||
- repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
- repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
ref: values
|
ref: values
|
||||||
ignoreDifferences:
|
ignoreDifferences:
|
||||||
|
|
|
@ -19,5 +19,5 @@ spec:
|
||||||
namespace: crossplane-system
|
namespace: crossplane-system
|
||||||
source:
|
source:
|
||||||
path: stacks/second-cluster/create-new-cluster-guestbook
|
path: stacks/second-cluster/create-new-cluster-guestbook
|
||||||
repoURL: https://gitea.{{{ .Env.DOMAIN }}}/giteaAdmin/edfbuilder
|
repoURL: https://{{{ .Env.DOMAIN_GITEA }}}/giteaAdmin/edfbuilder
|
||||||
targetRevision: HEAD
|
targetRevision: HEAD
|
||||||
|
|
Loading…
Reference in a new issue