Where are these ENVVARS coming from???
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- docker, kubernetes
- Ambito
- infrastructure
Direzione di ricerca
Inizia con i manifesti Kubernetes Deployment e Service e con il comportamento del container descritto nell’issue. Analizza il modo in cui Kubernetes espone ai pod le variabili d’ambiente relative a Service, quindi verifica se il repository documenta o controlla questo comportamento. Il lavoro è completato quando la fonte è spiegata e viene identificata qualsiasi modifica necessaria alla documentazione o al codice.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I've got a simple blue/green Kubernetes deployment using this container as described below:
apiVersion: apps/v1
kind: Deployment
metadata:
name: green-app
spec:
replicas: 1
selector:
matchLabels:
app: green-app
template:
metadata:
labels:
app: green-app
spec:
containers:
- name: http-https-echo
image: mendhak/http-https-echo
ports:
- containerPort: 8080
env:
- name: ECHO_INCLUDE_ENV_VARS
value: "1"
- name: APP_COLOR
value: "GREEN"
---
apiVersion: v1
kind: Service
metadata:
name: green-app
spec:
selector:
app: green-app
ports:
- protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: blue-app
spec:
replicas: 1
selector:
matchLabels:
app: blue-app
template:
metadata:
labels:
app: blue-app
spec:
containers:
- name: http-https-echo
image: mendhak/http-https-echo
ports:
- containerPort: 8080
env:
- name: ECHO_INCLUDE_ENV_VARS
value: "1"
- name: APP_COLOR
value: "BLUE"
---
apiVersion: v1
kind: Service
metadata:
name: blue-app
spec:
selector:
app: blue-app
ports:
- protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: color-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
# tls:
# - hosts:
# - '*.com'
rules:
- http:
paths:
- path: /green
pathType: Prefix
backend:
service:
name: green-app
port:
number: 80
- path: /blue
pathType: Prefix
backend:
service:
name: blue-app
port:
number: 80
Everything spins up and the /blue and /green endpoints work as they should.
But inside the blue are all of these environment variables referencing the green app (and vice versa)
/app $ env
KUBERNETES_PORT=tcp://172.20.0.1:443
GREEN_APP_PORT_80_TCP=tcp://172.20.144.83:80
KUBERNETES_SERVICE_PORT=443
NODE_VERSION=22.21.0
HOSTNAME=blue-app-64bd4f854f-x9v4j
YARN_VERSION=1.22.22
BLUE_APP_PORT_80_TCP=tcp://172.20.108.198:80
SHLVL=1
HOME=/home/node
ECHO_INCLUDE_ENV_VARS=1
GREEN_APP_SERVICE_HOST=172.20.144.83
BLUE_APP_SERVICE_HOST=172.20.108.198
TERM=xterm
KUBERNETES_PORT_443_TCP_ADDR=172.20.0.1
HTTP_PORT=8080
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
GREEN_APP_PORT=tcp://172.20.144.83:80
KUBERNETES_PORT_443_TCP_PORT=443
GREEN_APP_SERVICE_PORT=80
KUBERNETES_PORT_443_TCP_PROTO=tcp
HTTPS_PORT=8443
BLUE_APP_PORT=tcp://172.20.108.198:80
BLUE_APP_SERVICE_PORT=80
APP_COLOR=BLUE
GREEN_APP_PORT_80_TCP_ADDR=172.20.144.83
KUBERNETES_SERVICE_PORT_HTTPS=443
GREEN_APP_PORT_80_TCP_PORT=80
KUBERNETES_PORT_443_TCP=tcp://172.20.0.1:443
BLUE_APP_PORT_80_TCP_ADDR=172.20.108.198
GREEN_APP_PORT_80_TCP_PROTO=tcp
KUBERNETES_SERVICE_HOST=172.20.0.1
PWD=/app
BLUE_APP_PORT_80_TCP_PORT=80
BLUE_APP_PORT_80_TCP_PROTO=tcp
/app $
How can a simple pod that only has 2 environment variables defined (APP_COLOR and ECHO_INCLUDE_ENV_VARS) pickup all of these other variables? Where are they coming from!??!
- Lingua principale
- Shell
- Stelle
- 792
- Fork
- 152
- Merge medio
- 3g 18h
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 mendhak/docker-http-https-echo
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mendhak/docker-http-https-echo#80 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
mendhak/docker-http-https-echo#60 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
mendhak/docker-http-https-echo#59 · 1 commento ·
Tutte le issue di mendhak/docker-http-https-echo
Issue simili
-
Issue-Enhancement Needs-Triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
PowerShell/PowerShell#28061 · 2 reazioni ·
-
Feature Request: Add ability to load custom environment variables in linux-exec-server-installer.sh Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/vscode-remote-release#11867 ·
-
AuTest Bug Tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/trafficserver#13714 ·
-
Update to NCCL 2.32 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
conda-forge/nccl-feedstock#166 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
vllm-project/agentic-api#358 · 1 commento ·