Skip to content

Commit

Permalink
fix(oathkeeper): modify prom overlay issue
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Oct 6, 2024
1 parent f168550 commit b49700d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 100 deletions.
102 changes: 6 additions & 96 deletions oathkeeper/overlays/prom/kustomization.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,16 @@
---
configMapGenerator:
- name: oathkeeper-config
- behavior: replace
files:
- config.yml=oathkeeper-server-config.yml
- name: oathkeeper-envs
envs:
- configs.env
name: oathkeeper-config

images:
- name: oryd/oathkeeper
newTag: v0.40.7-distroless
- name: oryd/oathkeeper-maester
newTag: v0.1.10-arm64
- name: bitnami/kubectl
newTag: 1.31.1

commonLabels:
app.kubernetes.io/managed-by: Kustomize
app.kubernetes.io/name: oathkeeper
app.kubernetes.io/part-of: oathkeeper
app.kubernetes.io/version: v1.0.0
resources:
- ../../base
- servicemonitor-oathkeeper.yml
- servicemonitor-oathkeeper-maester.yml

replacements:
- source:
kind: Deployment
name: oathkeeper
fieldPath: metadata.namespace
targets:
- select:
kind: ClusterRoleBinding
name: oathkeeper-maester-role-binding
fieldPaths:
- subjects.[kind=ServiceAccount].namespace
options:
create: true
- source:
kind: Deployment
name: oathkeeper
fieldPath: spec.template.metadata.labels
targets:
- select:
kind: VMServiceScrape
name: oathkeeper-metrics
fieldPaths:
- spec.selector.matchLabels
options:
create: true
- select:
kind: Service
name: oathkeeper-metrics
fieldPaths:
- spec.selector
options:
create: true
- select:
kind: Service
name: oathkeeper-api
fieldPaths:
- spec.selector
options:
create: true
- select:
kind: Service
name: oathkeeper-proxy
fieldPaths:
- spec.selector
options:
create: true
- source:
kind: Deployment
name: oathkeeper-maester
fieldPath: spec.template.metadata.labels
targets:
- select:
kind: VMServiceScrape
name: oathkeeper-maester
fieldPaths:
- spec.selector.matchLabels
options:
create: true
- select:
kind: Service
name: oathkeeper-maester-metrics
fieldPaths:
- spec.selector
options:
create: true
- source:
kind: Service
name: oathkeeper-metrics
Expand All @@ -111,19 +36,4 @@ replacements:
options:
create: true

resources:
# - https://github.com/ory/oathkeeper-maester//config/crd?timeout=30s&ref=v0.1.10
- crds.yml
- clusterrole.yml
- clusterrolebinding.yml
- service-oathkeeper-api.yml
- service-oathkeeper-metrics.yml
- service-oathkeeper-proxy.yml
- service-oathkeeper-maester-metrics.yml
- serviceaccount.yml
- deployment-oathkeeper-maester.yml
- deployment-oathkeeper.yml
- vmservicescrape-oathkeeper.yml
- vmservicescrape-oathkeeper-maester.yml

namespace: auth
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: oathkeeper-maester
labels:
Expand Down
4 changes: 2 additions & 2 deletions oathkeeper/overlays/prom/servicemonitor-oathkeeper.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: oathkeeper
labels:
Expand Down

0 comments on commit b49700d

Please sign in to comment.