-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade mattermost to 9.7.1-uds.0-registry1 chore: upgrade uds-core to 0.20.0-registry1 docs: update dependency doc
- Loading branch information
1 parent
5b2cc61
commit 15ca8aa
Showing
9 changed files
with
210 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: identity-config-loader | ||
namespace: keycloak | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: data-loader | ||
spec: | ||
securityContext: | ||
fsGroup: 2000 | ||
containers: | ||
- name: uds-config-sync | ||
# renovate: datasource=github-tags depName=defenseunicorns/uds-identity-config versioning=semver | ||
image: ghcr.io/defenseunicorns/uds/identity-config:0.4.1 | ||
command: | ||
[ | ||
"sh", | ||
"-c", | ||
# This command looks for the Zarf "data injection marker" which is a timestamped file that is injected after everything else and marks the injection as complete. | ||
'while [ ! -f /home/nonroot/###ZARF_DATA_INJECTION_MARKER### ]; do echo "waiting for zarf data sync" && sleep 1; done; echo "we are done waiting!"; /home/nonroot/sync.sh', | ||
] | ||
securityContext: | ||
runAsUser: 65532 | ||
runAsGroup: 65532 | ||
resources: | ||
requests: | ||
cpu: "100m" | ||
memory: "128Mi" | ||
volumeMounts: | ||
- name: providers | ||
mountPath: /opt/keycloak/providers | ||
- name: data | ||
mountPath: /opt/keycloak/data | ||
- name: themes | ||
mountPath: /opt/keycloak/themes | ||
- name: conf | ||
mountPath: /opt/keycloak/conf | ||
restartPolicy: Never | ||
volumes: | ||
- name: providers | ||
persistentVolumeClaim: | ||
claimName: keycloak-providers | ||
# jars are only copied into providers -- the rest won't matter, but are needed for file permissions in the sync script | ||
- name: conf | ||
emptyDir: {} | ||
- name: data | ||
emptyDir: {} | ||
- name: themes | ||
emptyDir: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
kind: ZarfPackageConfig | ||
metadata: | ||
name: keycloak-config-wrapper | ||
version: "0.0.1" | ||
|
||
components: | ||
- name: keycloak-config-wrapper | ||
required: true | ||
description: Loads jar files at deploy time into a new zarf package | ||
only: | ||
cluster: | ||
architecture: amd64 | ||
files: | ||
# Transfer the files for zarf to use at deploytime | ||
- source: init-job.yaml | ||
target: tmp_deploy/init-job.yaml | ||
- source: zarfception.yaml | ||
target: tmp_deploy/zarf.yaml | ||
actions: | ||
onDeploy: | ||
before: | ||
# cleanup output from previous attempts | ||
- cmd: | | ||
rm -rf tmp_deploy | ||
mkdir tmp_deploy | ||
# Check deploy system arch | ||
- cmd: if [ "$(uname -m)" != "x86_64" ]; then echo "this package architecture is amd64, but the target system has a different architecture. These architectures must be the same" && exit 1; fi | ||
description: Check that the host architecture matches the package architecture | ||
maxRetries: 0 | ||
after: | ||
# check for jar files (CAN EXIT EARLY) | ||
- cmd: | | ||
COUNT=`ls -1 *.jar 2>/dev/null | wc -l` | ||
if [ $COUNT = 0 ]; then | ||
echo "No local JAR files detected -- SKIPPING CUSTOM PLUGIN LOAD" | ||
exit 0 | ||
fi | ||
# move to workdir | ||
cp *.jar tmp_deploy/ | ||
cd tmp_deploy | ||
# build the zarf wrapper wrapper (yo dawg... 'zarfception.yaml') -- collect the local files | ||
./zarf package create . --confirm | ||
# deploy the zarf wrapper | ||
./zarf package deploy zarf-package*.tar.zst --confirm | ||
# CLEANUP attempted deploys | ||
onSuccess: | ||
- cmd: rm -rf tmp_deploy | ||
onFailure: | ||
- cmd: rm -rf tmp_deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json | ||
kind: ZarfPackageConfig | ||
metadata: | ||
name: keycloak-config-wrapper | ||
version: "0.0.1" | ||
|
||
components: | ||
- name: keycloak-config-wrapper | ||
required: true | ||
description: Loads a local jar file into the cluster via zarf data injection. | ||
only: | ||
cluster: | ||
architecture: amd64 | ||
manifests: | ||
#create a job from the pre-existing init image | ||
- name: data-loader | ||
namespace: keycloak | ||
files: | ||
- init-job.yaml | ||
dataInjections: | ||
- source: . | ||
target: | ||
namespace: keycloak | ||
selector: app=data-loader | ||
container: uds-config-sync | ||
path: /home/nonroot | ||
compress: false | ||
actions: | ||
onDeploy: | ||
before: | ||
# cleanup previous attempts | ||
- cmd: | | ||
./zarf tools kubectl delete job -n keycloak identity-config-loader 2>/dev/null || true | ||
# Check deploy system arch | ||
- cmd: if [ "$(uname -m)" != "x86_64" ]; then echo "this package architecture is amd64, but the target system has a different architecture. These architectures must be the same" && exit 1; fi | ||
description: Check that the host architecture matches the package architecture | ||
maxRetries: 0 | ||
|
||
# check if any jars exist | ||
- cmd: | | ||
COUNT=`ls -1 *.jar 2>/dev/null | wc -l` | ||
if [ $COUNT = 0 ]; then | ||
echo "No local JAR files detected -- SKIPPING CUSTOM PLUGIN LOAD" | ||
exit 0 | ||
fi | ||
after: | ||
# wait for the job to finish | ||
- cmd: ./zarf tools wait-for job -n keycloak identity-config-loader '{.status.succeeded}'=1 | ||
|
||
onSuccess: | ||
# bounce keycloak statefulset | ||
- cmd: ./zarf tools kubectl rollout restart statefulset -n keycloak keycloak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters