Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions component/group-prune.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,31 @@ local jobTemplate = {
},
};

local netpol = kube.NetworkPolicy('allow-group-prune-egress-kube-apiserver') + namespace {
spec+: {
podSelector: {
matchLabels: {
name: 'group-prune',
},
},
policyTypes: [ 'Egress' ],
egress: [
{
ports: [
{
port: '6443',
protocol: 'TCP',
},
{
port: '443',
protocol: 'TCP',
},
],
},
],
},
};

local cronJob = kube.CronJob('group-prune') + namespace {
spec+: {
schedule: params.groupPrune.schedule,
Expand All @@ -101,5 +126,6 @@ local cronJob = kube.CronJob('group-prune') + namespace {
sa,
rb,
cm,
netpol,
cronJob,
]
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ apiVersion: espejote.io/v1alpha1
kind: ManagedResource
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/sync-wave: '10'
labels:
app.kubernetes.io/component: openshift4-authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ apiVersion: espejote.io/v1alpha1
kind: ManagedResource
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
syn.tools/source: https://github.com/appuio/component-openshift4-authentication.git
labels:
app.kubernetes.io/component: openshift4-authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,27 @@ metadata:
name: group-prune
namespace: openshift-config
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
labels:
name: allow-group-prune-egress-kube-apiserver
name: allow-group-prune-egress-kube-apiserver
namespace: openshift-config
spec:
egress:
- ports:
- port: '6443'
protocol: TCP
- port: '443'
protocol: TCP
ingress: []
podSelector:
matchLabels:
name: group-prune
policyTypes:
- Egress
---
apiVersion: batch/v1
kind: CronJob
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ apiVersion: espejote.io/v1alpha1
kind: ManagedResource
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/sync-wave: '10'
labels:
app.kubernetes.io/component: openshift4-authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ apiVersion: espejote.io/v1alpha1
kind: ManagedResource
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
syn.tools/source: https://github.com/appuio/component-openshift4-authentication.git
labels:
app.kubernetes.io/component: openshift4-authentication
Expand Down
Loading