Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI script to update fleet reset values #2261

Merged
merged 2 commits into from
Apr 5, 2024
Merged

Conversation

manno
Copy link
Member

@manno manno commented Mar 22, 2024

Still seeing problems with https://github.com/rancher/fleet/actions/workflows/rancher-upgrade-fleet-to-head.yml

Values handling changed in recent Helm versions, maybe that's related. Using the new switch --reset-then-reuse-values:

when upgrading, reset the values to the ones built into the chart, apply the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' or '--reuse-values' is specified, this is ignored

@manno manno requested a review from a team as a code owner March 22, 2024 17:04
weyfonk
weyfonk previously approved these changes Apr 2, 2024
Copy link
Contributor

@weyfonk weyfonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My confidence in this as a fix is pretty low... but this is worth trying :)
Edit: this doesn't seem to fix anything though, right?

manno and others added 2 commits April 4, 2024 16:39
Values handling changed in recent Helm versions, maybe that's related.
Using the new switch `--reset-then-reuse-values`:
> when upgrading, reset the values to the ones built into the chart, apply the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' or '--reuse-values' is specified, this is ignored
@manno manno force-pushed the fix-upgrade-fleet-ci-script branch from 44c17ee to 8b1640a Compare April 4, 2024 14:39
@manno
Copy link
Member Author

manno commented Apr 4, 2024

Notes on --reset-then-reuse-values

Without --reset-then-reuse-values the upgrade script will change the helm values.
As seen some important values are removed:

-==== values before upgrade ====
+==== values after upgrade ====
 COMPUTED VALUES:
 agentCheckinInterval: 15m
 agentImage:
   imagePullPolicy: IfNotPresent
   repository: rancher/fleet-agent
-  tag: v0.9.0
-apiServerCA: |-
-  -----BEGIN CERTIFICATE-----
- [...]
-  -----END CERTIFICATE-----
-apiServerURL: https://172.19.0.1.xip.io
+  tag: dev
+apiServerCA: ""
+apiServerURL: ""
 bootstrap:
-  agentNamespace: cattle-fleet-local-system
+  agentNamespace: ""
   branch: master
-  enabled: false
+  enabled: true
   namespace: fleet-local
   paths: ""
   repo: ""
   secret: ""
 debug: false
 debugLevel: 0
-gitjob:
-  debug: false
-  gitjob:
-    repository: rancher/gitjob
-    tag: v0.1.96
-  global:
-    cattle:
-      systemDefaultRegistry: ""
-  noProxy: 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local
-  nodeSelector:
-    kubernetes.io/os: linux
-  priorityClassName: rancher-critical
-  tolerations:
-  - effect: NoSchedule
-    key: cattle.io/os
-    operator: Equal
-    value: linux
 gitops:
   enabled: true
 global:
@@ -55,11 +26,15 @@ ignoreClusterRegistrationLabels: false
 image:
   imagePullPolicy: IfNotPresent
   repository: rancher/fleet
-  tag: v0.9.0
+  tag: dev
+leaderElection:
+  leaseDuration: 30s
+  renewDeadline: 25s
+  retryPeriod: 10s
 migrations:
   clusterRegistrationCleanup: true
 noProxy: 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local
 nodeSelector: {}
-priorityClassName: rancher-critical
+priorityClassName: ""
 propagateDebugSettingsToAgents: true
 tolerations: []

With --reset-then-reuse-values only the values from the update change:

-==== values before upgrade ====
+==== values after upgrade ====
 COMPUTED VALUES:
 agentCheckinInterval: 15m
 agentImage:
   imagePullPolicy: IfNotPresent
   repository: rancher/fleet-agent
-  tag: v0.9.0
+  tag: dev
 apiServerCA: |-
   -----BEGIN CERTIFICATE-----
   MIIBvjCCAWOgAwIBAgIBADAKBggqhkjOPQQDAjBGMRwwGgYDVQQKExNkeW5hbWlj
@@ -30,22 +30,7 @@ bootstrap:
 debug: false
 debugLevel: 0
 gitjob:
-  debug: false
-  gitjob:
-    repository: rancher/gitjob
-    tag: v0.1.96
-  global:
-    cattle:
-      systemDefaultRegistry: ""
-  noProxy: 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local
-  nodeSelector:
-    kubernetes.io/os: linux
   priorityClassName: rancher-critical
-  tolerations:
-  - effect: NoSchedule
-    key: cattle.io/os
-    operator: Equal
-    value: linux
 gitops:
   enabled: true
 global:
@@ -55,7 +40,11 @@ ignoreClusterRegistrationLabels: false
 image:
   imagePullPolicy: IfNotPresent
   repository: rancher/fleet
-  tag: v0.9.0
+  tag: dev
+leaderElection:
+  leaseDuration: 30s
+  renewDeadline: 25s
+  retryPeriod: 10s
 migrations:
   clusterRegistrationCleanup: true
 noProxy: 127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local

@manno
Copy link
Member Author

manno commented Apr 4, 2024

@thardeck thardeck merged commit 330bd1c into main Apr 5, 2024
9 checks passed
@thardeck thardeck deleted the fix-upgrade-fleet-ci-script branch April 5, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants