Skip to content

Commit

Permalink
Add monitoring-ns kustomization manifest
Browse files Browse the repository at this point in the history
Kustomize does not auto-create namespaces- this feature was
removed due to kubernetes-sigs/kustomize#514.
The monitoring-ns resource can be included in kustomizations that
also include other monitoring resources, such as prometheus and
grafana, to avoid boilerplate involved in creating the namespace
manually.

Signed-off-by: Ryan Drew <[email protected]>
  • Loading branch information
learnitall committed Oct 14, 2022
1 parent ed6b80d commit b148bdd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ Three dashboards are provided out-of-the-box in `kustomize/grafana/dashboards`,

A dashboard provider is used to accomplish this. See the [grafana docs](https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards) for more information.

### monitoring-ns

Creates a namespace named 'monitoring'.
Kustomize doesn't auto-create namespaces, so something needs to create the 'monitoring' ns for resources like prometheus and grafana (see above).
By including this manifest, you won't have to manually create the namespace before a `kustomize build | kubectl apply -f -`.

### registry

Deploys an in-cluster registry in the namespace `registry`, available through the service named `registry`.
Expand Down
4 changes: 4 additions & 0 deletions kustomize/monitoring-ns/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
4 changes: 4 additions & 0 deletions kustomize/monitoring-ns/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: monitoring

0 comments on commit b148bdd

Please sign in to comment.