Skip to content

Commit b3e40ba

Browse files
committed
Change openshift to distro.openshift
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent bf031e9 commit b3e40ba

12 files changed

+67
-9
lines changed

apis/fluxcd/v1alpha1/fluxcdconfig_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ type FluxCDConfigSpec struct {
6666
ExtraObjects []runtime.RawExtension `json:"extraObjects"`
6767
// +optional
6868
Prometheus PrometheusSpec `json:"prometheus"`
69+
// +optional
70+
Distro Distro `json:"distro"`
6971
}
7072

7173
type CRDsSpec struct {
@@ -367,6 +369,10 @@ type Relabeling struct {
367369
Regex string `json:"regex"`
368370
}
369371

372+
type Distro struct {
373+
Openshift bool `json:"openshift"`
374+
}
375+
370376
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
371377
//+kubebuilder:object:root=true
372378
//+kubebuilder:subresource:status

apis/fluxcd/v1alpha1/openapi_generated.go

Lines changed: 28 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/fluxcd/v1alpha1/zz_generated.deepcopy.go

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crds/fluxcd.open-cluster-management.io_fluxcdconfigs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,13 @@ spec:
510510
type: string
511511
type: object
512512
type: object
513+
distro:
514+
properties:
515+
openshift:
516+
type: boolean
517+
required:
518+
- openshift
519+
type: object
513520
extraObjects:
514521
items:
515522
type: object

pkg/manager/agent-manifests/flux2/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This helm chart is maintained and released by the fluxcd-community on a best eff
2323
| cli.tolerations | list | `[]` | |
2424
| clusterDomain | string | `"cluster.local"` | |
2525
| crds.annotations | object | `{}` | Add annotations to all CRD resources, e.g. "helm.sh/resource-policy": keep |
26+
| distro.openshift | bool | `false` | |
2627
| extraObjects | list | `[]` | Array of extra K8s manifests to deploy |
2728
| helmController.affinity | object | `{}` | |
2829
| helmController.annotations."prometheus.io/port" | string | `"8080"` | |
@@ -141,7 +142,6 @@ This helm chart is maintained and released by the fluxcd-community on a best eff
141142
| notificationController.webhookReceiver.ingress.tls | list | `[]` | |
142143
| notificationController.webhookReceiver.service.annotations | object | `{}` | |
143144
| notificationController.webhookReceiver.service.labels | object | `{}` | |
144-
| openshift | bool | `false` | |
145145
| policies.create | bool | `true` | |
146146
| prometheus.podMonitor.create | bool | `false` | Enables podMonitor endpoint |
147147
| prometheus.podMonitor.podMetricsEndpoints[0].port | string | `"http-prom"` | |

pkg/manager/agent-manifests/flux2/templates/image-automation-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
{{- end }}
110110
{{- if .Values.imageAutomationController.podSecurityContext }}
111111
securityContext: {{ toYaml .Values.imageAutomationController.podSecurityContext | nindent 8 }}
112-
{{- else if not .Values.openshift }}
112+
{{- else if not .Values.distro.openshift }}
113113
securityContext:
114114
fsGroup: 1337
115115
{{- end}}

pkg/manager/agent-manifests/flux2/templates/image-reflector-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ spec:
111111
{{- end }}
112112
{{- if .Values.imageReflectionController.podSecurityContext }}
113113
securityContext: {{ toYaml .Values.imageReflectionController.podSecurityContext | nindent 8 }}
114-
{{- else if not .Values.openshift }}
114+
{{- else if not .Values.distro.openshift }}
115115
securityContext:
116116
fsGroup: 1337
117117
{{- end}}

pkg/manager/agent-manifests/flux2/templates/kustomize-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ spec:
127127
{{- end }}
128128
{{- if .Values.kustomizeController.podSecurityContext }}
129129
securityContext: {{ toYaml .Values.kustomizeController.podSecurityContext | nindent 8 }}
130-
{{- else if not .Values.openshift }}
130+
{{- else if not .Values.distro.openshift }}
131131
securityContext:
132132
fsGroup: 1337
133133
{{- end}}

pkg/manager/agent-manifests/flux2/templates/openshift.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.openshift }}
1+
{{- if .Values.distro.openshift }}
22
# Allow Flux controllers to run as non-root on OpenShift
33
# Docs: https://fluxcd.io/flux/installation/configuration/openshift/
44
apiVersion: rbac.authorization.k8s.io/v1

pkg/manager/agent-manifests/flux2/templates/source-controller.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ spec:
112112
{{- end }}
113113
{{- if .Values.sourceController.podSecurityContext }}
114114
securityContext: {{ toYaml .Values.sourceController.podSecurityContext | nindent 8 }}
115-
{{- else if not .Values.openshift }}
115+
{{- else if not .Values.distro.openshift }}
116116
securityContext:
117117
fsGroup: 1337
118118
{{- end}}

0 commit comments

Comments
 (0)