Skip to content

Commit e218ccf

Browse files
Revert "feat: limits enforcement in runtime installation (#457)"
This reverts commit c26b05c
1 parent b8d1d45 commit e218ccf

File tree

4 files changed

+1
-107
lines changed

4 files changed

+1
-107
lines changed

charts/gitops-runtime/templates/hooks/pre-install/rbac.yaml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -41,48 +41,3 @@ metadata:
4141
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation,hook-failed
4242
helm.sh/hook-weight: "-10"
4343
{{- end }}
44-
45-
{{- if not .Values.installer.skipUsageValidation }}
46-
---
47-
apiVersion: rbac.authorization.k8s.io/v1
48-
kind: ClusterRole
49-
metadata:
50-
name: validate-usage-cr
51-
annotations:
52-
helm.sh/hook: pre-install
53-
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation,hook-failed
54-
helm.sh/hook-weight: "5"
55-
rules:
56-
- apiGroups:
57-
- ""
58-
resources:
59-
- secrets
60-
verbs:
61-
- get
62-
---
63-
apiVersion: rbac.authorization.k8s.io/v1
64-
kind: ClusterRoleBinding
65-
metadata:
66-
name: validate-usage-crb
67-
annotations:
68-
helm.sh/hook: pre-install
69-
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation,hook-failed
70-
helm.sh/hook-weight: "5"
71-
roleRef:
72-
apiGroup: rbac.authorization.k8s.io
73-
kind: ClusterRole
74-
name: validate-usage-cr
75-
subjects:
76-
- kind: ServiceAccount
77-
name: validate-usage-sa
78-
namespace: {{ .Release.Namespace }}
79-
---
80-
apiVersion: v1
81-
kind: ServiceAccount
82-
metadata:
83-
name: validate-usage-sa
84-
annotations:
85-
helm.sh/hook: pre-install
86-
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation,hook-failed
87-
helm.sh/hook-weight: "5"
88-
{{- end }}
Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +0,0 @@
1-
{{- if not .Values.installer.skipUsageValidation }}
2-
apiVersion: v1
3-
kind: ConfigMap
4-
metadata:
5-
name: validate-usage-config
6-
annotations:
7-
helm.sh/hook: pre-install
8-
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation,hook-failed
9-
helm.sh/hook-weight: "5"
10-
data:
11-
values.yaml: |
12-
{{ .Values | toYaml | indent 4 }}
13-
14-
---
15-
apiVersion: batch/v1
16-
kind: Job
17-
metadata:
18-
name: validate-usage
19-
annotations:
20-
helm.sh/hook: pre-install
21-
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation
22-
helm.sh/hook-weight: "10"
23-
spec:
24-
backoffLimit: 0
25-
ttlSecondsAfterFinished: 300
26-
template:
27-
spec:
28-
serviceAccountName: validate-usage-sa
29-
restartPolicy: Never
30-
containers:
31-
- name: validate-usage
32-
image: "{{ .Values.installer.image.repository }}:{{ .Values.installer.image.tag | default .Chart.Version }}"
33-
imagePullPolicy: {{ .Values.installer.image.pullPolicy }}
34-
env:
35-
- name: NAMESPACE
36-
valueFrom:
37-
fieldRef:
38-
fieldPath: metadata.namespace
39-
command: ["sh", "-c"]
40-
args:
41-
- |
42-
cf account validate-usage --fail-condition=reached --subject=clusters --values /job_tmp/values.yaml --namespace ${NAMESPACE} --hook --log-level debug
43-
volumeMounts:
44-
- name: validate-usage-volume
45-
mountPath: "/job_tmp"
46-
volumes:
47-
- name: validate-usage-volume
48-
configMap:
49-
name: validate-usage-config
50-
{{- with .Values.installer.nodeSelector | default .Values.global.nodeSelector }}
51-
nodeSelector: {{ toYaml . | nindent 8 }}
52-
{{- end }}
53-
{{- with .Values.installer.tolerations | default .Values.global.tolerations}}
54-
tolerations: {{ toYaml . | nindent 6 }}
55-
{{- end }}
56-
{{- with .Values.installer.affinity }}
57-
affinity: {{ toYaml . | nindent 8 }}
58-
{{- end }}
59-
{{- end }}

charts/gitops-runtime/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ global:
186186
installer:
187187
# -- if set to true, pre-install hook will *not* run
188188
skipValidation: false
189-
# -- if set to true, pre-install hook will *not* run
190-
skipUsageValidation: false
191189
image:
192190
repository: quay.io/codefresh/gitops-runtime-installer
193191
tag: ""

installer-image/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FROM debian:12.10-slim
88

99
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
1010

11-
ARG CF_CLI_VERSION=v0.2.7
11+
ARG CF_CLI_VERSION=v0.2.6
1212
ARG TARGETARCH
1313

1414
RUN apt-get update && apt-get install curl jq -y

0 commit comments

Comments
 (0)