Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
Only load and process files in postprocessing filter for non-OCP4
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Nov 3, 2021
1 parent 8b858cc commit edbdb5f
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 164 deletions.
27 changes: 13 additions & 14 deletions postprocess/non-openshift.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,12 @@ local fixup_servicemonitor(obj) =
};

local fixup_obj(obj) =
if distribution != 'openshift4' then (
if obj.kind == 'Deployment' then
fixup_deploy(obj)
else if obj.kind == 'Service' then
fixup_service(obj)
else if obj.kind == 'ServiceMonitor' then
fixup_servicemonitor(obj)
else
obj
)
if obj.kind == 'Deployment' then
fixup_deploy(obj)
else if obj.kind == 'Service' then
fixup_service(obj)
else if obj.kind == 'ServiceMonitor' then
fixup_servicemonitor(obj)
else
obj;

Expand All @@ -85,7 +81,10 @@ local fixup(obj_file) =
// process all objs
[ fixup_obj(obj) for obj in objs ];

{
[stem(elem)]: fixup(input_file(elem))
for elem in chart_files
}
if distribution != 'openshift4' then
{
[stem(elem)]: fixup(input_file(elem))
for elem in chart_files
}
else
{}
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,52 @@ spec:
operator: resource-locker-operator
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --tls-cert-file=/etc/certs/tls/tls.crt
- --tls-private-key-file=/etc/certs/tls/tls.key
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources:
requests:
cpu: 100m
memory: 20Mi
volumeMounts:
- mountPath: /etc/certs/tls
name: tls-cert
- args:
- --leader-elect
command:
- /manager
image: quay.io/redhat-cop/resource-locker-operator:v1.1.0
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: resource-locker-operator
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 20Mi
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --tls-cert-file=/etc/certs/tls/tls.crt
- --tls-private-key-file=/etc/certs/tls/tls.key
- --v=10
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
resources:
requests:
cpu: 100m
memory: 20Mi
volumeMounts:
- mountPath: /etc/certs/tls
name: tls-cert
- args:
- --leader-elect
command:
- /manager
image: quay.io/redhat-cop/resource-locker-operator:v1.1.0
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: resource-locker-operator
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 20Mi
serviceAccountName: resource-locker-operator-controller-manager
volumes:
- name: tls-cert
secret:
defaultMode: 420
secretName: resource-locker-operator-certs
- name: tls-cert
secret:
defaultMode: 420
secretName: resource-locker-operator-certs
Loading

0 comments on commit edbdb5f

Please sign in to comment.