Problems with int32 conversion?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Reproduce the failure with krane-3.6.0 using the Grafana Tanka JSON shown, then inspect the deployment path that generates the displayed YAML and converts value to "1e+06". Done means the generated PriorityClass preserves value as a Kubernetes-compatible integer and the deployment succeeds.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi,
running krane-3.6.0 i ran into the following issue:
Using grafana/tanka i get the following json to apply to k8s-1.30.
...
"priority_class_postgres_operator_pod": {
"apiVersion": "scheduling.k8s.io/v1",
"description": "Use only for databases controlled by Postgres operator",
"globalDefault": false,
"kind": "PriorityClass",
"metadata": {
"labels": {
"app.kubernetes.io/instance": "postgres-operator",
"app.kubernetes.io/managed-by": "Helmraiser",
"app.kubernetes.io/name": "postgres-operator",
"helm.sh/chart": "postgres-operator-1.14.0"
},
"name": "postgres-operator-pod",
"namespace": "app"
},
"preemptionPolicy": "PreemptLowerPriority",
"value": 1000000
},
...
But deploying with krane fails with the following error:
[FATAL][2025-02-17 12:00:50 +0000] Invalid template: PriorityClass-postgres-operator-pod20250217-589-k00em4.yml
[FATAL][2025-02-17 12:00:50 +0000] > Error message:
[FATAL][2025-02-17 12:00:50 +0000] Error from server (BadRequest): error when creating "/tmp/d20250217-589-vzxhvs/PriorityClass-postgres-operator-pod20250217-589-k00em4.yml": PriorityClass in version "v1" cannot be handled as a PriorityClass: json: cannot unmarshal string into Go struct field PriorityClass.value of type int32
[FATAL][2025-02-17 12:00:50 +0000] > Template content:
[FATAL][2025-02-17 12:00:50 +0000] ---
[FATAL][2025-02-17 12:00:50 +0000] apiVersion: scheduling.k8s.io/v1
[FATAL][2025-02-17 12:00:50 +0000] description: Use only for databases controlled by Postgres operator
[FATAL][2025-02-17 12:00:50 +0000] globalDefault: false
[FATAL][2025-02-17 12:00:50 +0000] kind: PriorityClass
[FATAL][2025-02-17 12:00:50 +0000] metadata:
[FATAL][2025-02-17 12:00:50 +0000] labels:
[FATAL][2025-02-17 12:00:50 +0000] app.kubernetes.io/instance: postgres-operator
[FATAL][2025-02-17 12:00:50 +0000] app.kubernetes.io/managed-by: Helmraiser
[FATAL][2025-02-17 12:00:50 +0000] app.kubernetes.io/name: postgres-operator
[FATAL][2025-02-17 12:00:50 +0000] helm.sh/chart: postgres-operator-1.14.0
[FATAL][2025-02-17 12:00:50 +0000] tanka.dev/environment: 809e5090a4bc8f682ecfaf6007b78d885458f3576feecf7a
[FATAL][2025-02-17 12:00:50 +0000] name: postgres-operator-pod
[FATAL][2025-02-17 12:00:50 +0000] namespace: app
[FATAL][2025-02-17 12:00:50 +0000] preemptionPolicy: PreemptLowerPriority
[FATAL][2025-02-17 12:00:50 +0000] value: "1e+06"
Which looks to me like krane is converting the 10000 to a string "1e+06" which kubernetes doesn't like?
regards,
strowi
- Lingua principale
- Ruby
- Stelle
- 1.4k
- Fork
- 119
- Merge medio
- 1h 7m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Shopify/krane
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
:sparkles: enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
-
:sparkles: enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
Tutte le issue di Shopify/krane
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hanami/hanami-action#536 ·
-
[2026-11] Latest release (2026-11) still has expanded list entries that are no longer supportedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Shopify/product-taxonomy#1054 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 13 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
docker/model-runner#1118 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
TarteelAI/quranic-universal-library#1111 ·
I maintainer di solito rispondono entro 1 giorno