File tree 4 files changed +34
-0
lines changed
4 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,17 @@ func Release(
104
104
)
105
105
metaVars := m .MetaVars ()
106
106
107
+ crds , err := m .GetCRDs ()
108
+ if err != nil {
109
+ return nil , err
110
+ }
111
+
112
+ reconcileResources := make ([]string , 0 )
113
+
114
+ for _ , crd := range crds {
115
+ reconcileResources = append (reconcileResources , strings .ToLower (crd .Names .Camel ))
116
+ }
117
+
107
118
releaseVars := & templateReleaseVars {
108
119
metaVars ,
109
120
ImageReleaseVars {
@@ -112,6 +123,7 @@ func Release(
112
123
},
113
124
metadata ,
114
125
serviceAccountName ,
126
+ reconcileResources ,
115
127
}
116
128
for _ , path := range releaseTemplatePaths {
117
129
outPath := strings .TrimSuffix (path , ".tpl" )
@@ -140,4 +152,6 @@ type templateReleaseVars struct {
140
152
Metadata * ackmetadata.ServiceMetadata
141
153
// ServiceAccountName is the name of the ServiceAccount used in the Helm chart
142
154
ServiceAccountName string
155
+ // ReconcileResources contains all CRD names in their original format
156
+ ReconcileResources []string
143
157
}
Original file line number Diff line number Diff line change 59
59
- "$(ACK_WATCH_NAMESPACE)"
60
60
- --watch-selectors
61
61
- "$(ACK_WATCH_SELECTORS)"
62
+ - --reconcile-resources
63
+ - "$(RECONCILE_RESOURCES)"
62
64
- --deletion-policy
63
65
- "$(DELETION_POLICY)"
64
66
{ { " {{- if .Values.leaderElection.enabled }}" } }
@@ -107,6 +109,8 @@ spec:
107
109
value: { { IncludeTemplate " watch-namespace" } }
108
110
- name: ACK_WATCH_SELECTORS
109
111
value: { { " {{ .Values.watchSelectors }}" } }
112
+ - name: RECONCILE_RESOURCES
113
+ value: { { " {{ join \" ,\" .Values.reconcile.resources | quote }}" } }
110
114
- name: DELETION_POLICY
111
115
value: { { " {{ .Values.deletionPolicy }}" } }
112
116
- name: LEADER_ELECTION_NAMESPACE
Original file line number Diff line number Diff line change 239
239
},
240
240
"resourceMaxConcurrentSyncs" : {
241
241
"type" : " object"
242
+ },
243
+ "resources" : {
244
+ "type" : " array" ,
245
+ "items" : {
246
+ "type" : " string"
247
+ },
248
+ "description" : " List of resource kinds to reconcile. If empty, all resources will be reconciled."
242
249
}
243
250
},
244
251
"type" : " object"
Original file line number Diff line number Diff line change @@ -137,6 +137,15 @@ reconcile:
137
137
# An object representing the reconcile max concurrent syncs configuration for each specific
138
138
# resource.
139
139
resourceMaxConcurrentSyncs: { }
140
+
141
+ # Set the value of resources to specify which resource kinds to reconcile.
142
+ # If empty, all resources will be reconciled.
143
+ # If specified, only the listed resource kinds will be reconciled.
144
+ resources: []
145
+ # Available resource kinds for this controller:
146
+ { {- range $resource := .ReconcileResources } }
147
+ # - { { $resource } }
148
+ { {- end } }
140
149
141
150
serviceAccount:
142
151
# Specifies whether a service account should be created
You can’t perform that action at this time.
0 commit comments