Skip to content

Commit c5cd643

Browse files
Feat/revert cr 28342 usage (#474)
1 parent b8d1d45 commit c5cd643

File tree

5 files changed

+1
-169
lines changed

5 files changed

+1
-169
lines changed

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

-45
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 }}

charts/gitops-runtime/templates/hooks/pre-install/validate-usage.yaml

-59
This file was deleted.

charts/gitops-runtime/tests/global_constraints_test.yaml

-62
Original file line numberDiff line numberDiff line change
@@ -436,68 +436,6 @@ tests:
436436
value: another-value
437437
effect: NoSchedule
438438

439-
- it: validate-usage job should have nodeSelector from .Values.global
440-
values:
441-
- ./values/global-constraints-values.yaml
442-
template: hooks/pre-install/validate-usage.yaml
443-
documentSelector:
444-
path: kind
445-
value: Job
446-
asserts:
447-
- equal:
448-
path: spec.template.spec.nodeSelector
449-
value:
450-
some-key: some-value
451-
extra-key: extra-value
452-
453-
- it: validate-usage job should have nodeSelector from .Values.installer and NOT from .Values.global
454-
values:
455-
- ./values/global-constraints-values.yaml
456-
- ./values/subcharts-constraints-values.yaml
457-
template: hooks/pre-install/validate-usage.yaml
458-
documentSelector:
459-
path: kind
460-
value: Job
461-
asserts:
462-
- equal:
463-
path: spec.template.spec.nodeSelector
464-
value:
465-
some-key: another-value
466-
foo: bar
467-
468-
- it: validate-usage job should have tolerations from .Values.global
469-
values:
470-
- ./values/global-constraints-values.yaml
471-
template: hooks/pre-install/validate-usage.yaml
472-
documentSelector:
473-
path: kind
474-
value: Job
475-
asserts:
476-
- equal:
477-
path: spec.template.spec.tolerations
478-
value:
479-
- key: some-key
480-
operator: Equal
481-
value: some-value
482-
effect: NoSchedule
483-
484-
- it: validate-usage job should have tolerations from .Values.installer and NOT from .Values.global
485-
values:
486-
- ./values/global-constraints-values.yaml
487-
- ./values/subcharts-constraints-values.yaml
488-
template: hooks/pre-install/validate-usage.yaml
489-
documentSelector:
490-
path: kind
491-
value: Job
492-
asserts:
493-
- equal:
494-
path: spec.template.spec.tolerations
495-
value:
496-
- key: another-key
497-
operator: Equal
498-
value: another-value
499-
effect: NoSchedule
500-
501439

502440
- it: cleanup-resources job should have nodeSelector from .Values.global
503441
values:

charts/gitops-runtime/values.yaml

-2
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

+1-1
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)