-
Notifications
You must be signed in to change notification settings - Fork 86
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
Klipper is unable to upgrade chart with PDB #181
Comments
https://kubernetes.io/docs/reference/using-api/deprecation-guide/#poddisruptionbudget-v125 It looks like this was just fixed in the helm-mapkubeapis plugin 3 weeks ago: https://github.com/helm/helm-mapkubeapis/pull/102/files If you want to upgrade this chart prior to our pulling in that update to the API mapping plugin, you'll need to install helm and the plugin on an administrative host and perform the migration manually. |
@brandond Does this patch included in 1.27.2+k3s1?
|
Yes it is, but note that it only handles migrating existing resources. If the chart is trying to add new resources using the wrong API version, the mapkubeapis plugin won't handle that - you need to update the chart itself. Can you confirm that the chart is using the new version? |
@brandond Yes, crdb chart should work with 1.25+ |
What version of the chart do you currently have installed, and what version are you upgrading to? Can you share the HelmChart yaml? |
@brandond k3s 1.24 -> 1.27 chart: cockroachdb
helmVersion: v3
repo: https://charts.cockroachdb.com
targetNamespace: crdb
valuesContent: |
nameOverride: crdb
fullnameOverride: crdb
conf:
cache: 10%
max-sql-memory: 30%
log:
enabled: true
config:
file-defaults:
format: json
store:
enabled: true
init:
provisioning:
enabled: true
users: []
databases: []
statefulset:
replicas: REDACTED
podManagementPolicy: OrderedReady
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: _status/vars
resources:
limits:
cpu: REDACTED
memory: REDACTED
requests:
cpu: REDACTED
memory: REDACTED
podAntiAffinity:
topologyKey: kubernetes.io/hostname
type: hard
customLivenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 20
customReadinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 20
env:
- name: GOMEMLIMIT
value: REDACTED
ingress:
enabled: true
annotations:
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/auth-url: https://$host/oauth2/auth
nginx.ingress.kubernetes.io/auth-signin: https://$host/oauth2/start?rd=$escaped_request_uri
nginx.ingress.kubernetes.io/service-upstream: "true"
hosts:
- REDACTED
tls:
- hosts:
- REDACTED
secretName: crdb-tls
storage:
persistentVolume:
enabled: true
size: REDACTED
storageClass: REDACTED
tls:
enabled: false
certs:
selfSigner:
enabled: false
version: 11.0.1 |
Helm template version is ok # Source: cockroachdb/templates/poddisruptionbudget.yaml
kind: PodDisruptionBudget
apiVersion: policy/v1
metadata:
name: crdb-budget
namespace: "crdb"
labels:
helm.sh/chart: cockroachdb-11.0.1
app.kubernetes.io/name: crdb
app.kubernetes.io/instance: "crdb"
app.kubernetes.io/managed-by: "Helm"
spec:
selector:
matchLabels:
app.kubernetes.io/name: crdb
app.kubernetes.io/instance: "crdb"
app.kubernetes.io/component: cockroachdb
maxUnavailable: 1 |
Did you go directly from K3s 1.24 to 1.27 without stepping through 1.25 and 1.26? Also, why are you redacting your resource requests/limits, replicas, and so on? I'd like to test this HelmChart configuration locally but the redaction of inconsequential values makes that difficult. |
We had k3s 1.24 + crdb 8.1.5 Then bump k3s to 1.25, 1.26, 1.27, but because of broken pdb crdb chart was still 8.1.5 and we redact crdb sts image version manually for a long time Now we tried to upgrade crdb chart version with fixed pdb, but it is still failing It is not so important, you can remove requests/limits and set replicas to 3 |
helm-mapkubeapis is unable to update the resources because the resources are templated in an unexpected way. The standard is to put the apiVersion before the kind: apiVersion: policy/v1beta1
kind: PodDisruptionBudget but the crdb chart has: kind: PodDisruptionBudget
apiVersion: policy/v1beta1 This is documented in the plugin: https://github.com/helm/helm-mapkubeapis#api-mapping
|
You'll need to install the helm-mapkubeapis plugin yourself, modify the mapping file at https://github.com/helm/helm-mapkubeapis/blob/main/config/Map.yaml#L114-L115 to handle the reversed attribute order, and then execute it to migrate the versions in your existing chart deployment. |
@brandond Thank you! This fixed upgrade problem |
cockroachdb/helm-charts#270 (comment)
https://github.com/k3s-io/klipper-helm/blob/5e763524fd8cab4790289e7220e04a6d2a016adc/entry#L63
Install logs on k3s 1.26.3
The text was updated successfully, but these errors were encountered: