Skip to content

Commit

Permalink
fix: use release Kustomization for Gatekeeper (#59)
Browse files Browse the repository at this point in the history
A dedicated Kustomization gatekeeper-release is created that the other
two Kustomizations can depend on other than depending on a
Kustomization that isn't maintained as part of this repository. This
makes the whole gatekeeper service self-contained and less prone to
bugs.

This follows the same pattern we use for kubefed so we don't use
different approaches within this repo.
  • Loading branch information
makkes committed Nov 18, 2021
1 parent 9744728 commit 6bc2298
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/gatekeeper/0.6.8/constrainttemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
name: management
namespace: kommander-flux
dependsOn:
- name: gatekeeper
- name: gatekeeper-release
timeout: 60s
healthChecks:
- apiVersion: templates.gatekeeper.sh/v1beta1
Expand Down
2 changes: 1 addition & 1 deletion services/gatekeeper/0.6.8/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./release
- release.yaml
- constraints.yaml
- constrainttemplates.yaml
24 changes: 24 additions & 0 deletions services/gatekeeper/0.6.8/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: gatekeeper-release
namespace: ${releaseNamespace}
spec:
force: false
prune: true
interval: 1m0s
path: ./services/gatekeeper/0.6.8/release
sourceRef:
kind: GitRepository
name: management
namespace: kommander-flux
timeout: 60s
postBuild:
substituteFrom:
- kind: ConfigMap
name: substitution-vars
healthChecks:
- apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
name: gatekeeper
namespace: ${releaseNamespace}

0 comments on commit 6bc2298

Please sign in to comment.