Skip to content

Commit

Permalink
upgrade deprecated kustomization rules (#864)
Browse files Browse the repository at this point in the history
* upgrade deprecated kustomization rules

* pod monitor

* add gke podmonitoring example
  • Loading branch information
wasaga authored Jan 10, 2024
1 parent 7379292 commit 2769289
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 48 deletions.
6 changes: 4 additions & 2 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# This kustomization.yaml is not intended to be run by itself,
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- bases/ingress.pomerium.io_pomerium.yaml
- bases/ingress.pomerium.io_pomerium.yaml
#+kubebuilder:scaffold:crdkustomizeresource

# the following config is for teaching kustomize how to do kustomization for CRDs.
configurations:
- kustomizeconfig.yaml
- kustomizeconfig.yaml
2 changes: 1 addition & 1 deletion config/default/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace: pomerium
commonLabels:
app.kubernetes.io/name: pomerium
bases:
resources:
- ../crd
- ../pomerium
- ../gen_secrets
10 changes: 6 additions & 4 deletions config/gen_secrets/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: pomerium
resources:
- job.yaml
- role_binding.yaml
- role.yaml
- service_account.yaml
- job.yaml
- role_binding.yaml
- role.yaml
- service_account.yaml
19 changes: 10 additions & 9 deletions config/pomerium/deployment/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- base.yaml
patchesStrategicMerge:
- args.yaml
- image.yaml
- ports.yaml
- resources.yaml
- no-root.yaml
- readonly-root-fs.yaml
#- healthchecks.yaml
- base.yaml
patches:
- path: args.yaml
- path: image.yaml
- path: ports.yaml
- path: resources.yaml
- path: no-root.yaml
- path: readonly-root-fs.yaml
12 changes: 7 additions & 5 deletions config/pomerium/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#
# Deploys all-in-one controller + core pomerium
#
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- ./ingressclass.yaml
- ./deployment
- ./service
- ./rbac
- namespace.yaml
- ./ingressclass.yaml
- ./deployment
- ./service
- ./rbac
8 changes: 5 additions & 3 deletions config/pomerium/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- role.yaml
- role_binding.yaml
- service_account.yaml
- role.yaml
- role_binding.yaml
- service_account.yaml
6 changes: 4 additions & 2 deletions config/pomerium/service/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- proxy.yaml
- metrics.yaml
- proxy.yaml
- metrics.yaml
13 changes: 13 additions & 0 deletions config/prometheus/coreos-podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: pomerium
namespace: pomerium
spec:
endpoints:
- path: /metrics
port: metrics
scheme: http
selector:
matchLabels:
app.kubernetes.io/name: pomerium
12 changes: 12 additions & 0 deletions config/prometheus/gke-podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: monitoring.googleapis.com/v1
kind: PodMonitoring
metadata:
name: pomerium
spec:
selector:
matchLabels:
app.kubernetes.io/name: pomerium
endpoints:
- port: metrics
path: /metrics
interval: 1m
2 changes: 0 additions & 2 deletions config/prometheus/kustomization.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions config/prometheus/monitor.yaml

This file was deleted.

0 comments on commit 2769289

Please sign in to comment.