Missing namespace in deploy step when using kustomize deployment target
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia individuando la generazione della destinazione di deployment di kustomize e il template del workflow che crea il passaggio di deploy di GitHub Action. Esamina la kustomization.yaml e il manifest di deployment generati, quindi verifica che il namespace configurato venga applicato in modo coerente e passato all’azione di deploy; riproduci il workflow per confermare che il deployment abbia esito positivo per un namespace non predefinito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When creating a project using deployment type kustomize, the cli wizard will ask for target namespace:
✔ Please enter the namespace to place new resources in (default: default):
When using a non-default namespace, for example foo, the wizard will create the k8s deployment configuration like this:
apiVersion: apps/v1
kind: Deployment
metadata:
name: draft-demo
labels:
app: draft-demo
namespace: foo
However, the later workflow setup wizard will not prompt for target namespace, and generate a deployment step like this:
# Deploys application based on manifest files from previous step
- name: Deploy application
uses: Azure/k8s-deploy@v4
with:
action: deploy
manifests: ${{ steps.bake.outputs.manifestsBundle }}
images: |
${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }}
This deployment step will deploy to default namespace by default:
Run Azure/k8s-deploy@v4
with:
action: deploy
manifests: <omitted>
images: <omitted>
namespace: default # <---- default value for namespace
pull-images: true
strategy: basic
route-method: service
version-switch-buffer: 0
traffic-split-method: pod
percentage: 0
force: false
token: ***
annotate-namespace: true
private-cluster: false
skip-tls-verify: false
Hence, the deployment will fail with error like:
the namespace from the provided object "foo" does not match the namespace "default". You must pass '--namespace=foo' to perform this operation.
Mention the platform you are using
OSS draft
To Reproduce
Steps to reproduce the behavior:
See above description.
Expected behavior
When using kustomize deployment target:
- the namespace should be set in
kustomization.yamlinstead of k8s object spec. By using a kustomization level namespace settings, we can ensure all controlled k8s objects are created under the same namespace. - namespace settings should set in the deploy GitHub Action step.
- Lingua principale
- Go
- Stelle
- 644
- Fork
- 74
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri 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 Azure/draft
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 42/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Issue simili
-
kind/bug needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vllm-project/semantic-router#4024 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
alexgorbatchev/dotfiles#107 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100