Skip to content

Commit 4701f77

Browse files
authored
fix: only set addonconfigured condition when num addons > 0 (#38)
* fix: only set addonconfigured condition when num addons > 0 Signed-off-by: Artur Shad Nik <[email protected]> * chore: bump version Signed-off-by: Artur Shad Nik <[email protected]> --------- Signed-off-by: Artur Shad Nik <[email protected]>
1 parent 9cb11da commit 4701f77

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

fleetconfig-controller/charts/fleetconfig-controller/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Refer to the [Multicluster Controlplane configuration](https://github.com/open-c
115115
| `replicas` | fleetconfig-controller replica count | `1` |
116116
| `imageRegistry` | Image registry | `""` |
117117
| `image.repository` | Image repository | `quay.io/open-cluster-management/fleetconfig-controller` |
118-
| `image.tag` | Image tag | `v0.0.8` |
118+
| `image.tag` | Image tag | `v0.0.9` |
119119
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
120120
| `imagePullSecrets` | Image pull secrets | `[]` |
121121
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |

fleetconfig-controller/charts/fleetconfig-controller/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ imageRegistry: ""
277277
## @param image.pullPolicy Image pull policy
278278
image:
279279
repository: quay.io/open-cluster-management/fleetconfig-controller
280-
tag: v0.0.8
280+
tag: v0.0.9
281281
pullPolicy: IfNotPresent
282282

283283
## @param imagePullSecrets Image pull secrets

fleetconfig-controller/internal/controller/hub.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ func handleHub(ctx context.Context, kClient client.Client, fc *v1alpha1.FleetCon
9494
return err
9595
}
9696

97-
fc.SetConditions(true, v1alpha1.NewCondition(
98-
v1alpha1.FleetConfigAddonsConfigured, v1alpha1.FleetConfigAddonsConfigured, metav1.ConditionTrue, metav1.ConditionTrue,
99-
))
97+
if len(fc.Spec.AddOnConfigs) > 0 {
98+
fc.SetConditions(true, v1alpha1.NewCondition(
99+
v1alpha1.FleetConfigAddonsConfigured, v1alpha1.FleetConfigAddonsConfigured, metav1.ConditionTrue, metav1.ConditionTrue,
100+
))
101+
}
100102
// attempt an upgrade whenever the clustermanager's bundleVersion changes
101103
upgrade, err := hubNeedsUpgrade(ctx, fc, operatorC)
102104
if err != nil {

0 commit comments

Comments
 (0)