admiral
admiral copied to clipboard
If deployment has dash (-), the env will be the last word of the deployment name, not default
Describe the bug If there is "-" in the deployment name, then the env will not be default but lastword
Steps To Reproduce
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp-lastword
namespace: sample
labels:
identity: webapp-identity
spec:
replicas: 1
selector:
matchLabels:
app: webapp-lastword
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
labels:
app: webapp-lastword
identity: webapp-identity
spec:
containers:
- command:
- /bin/sleep
- 3650d
image: pstauffer/curl
imagePullPolicy: IfNotPresent
name: webapp-lastword
Expected behavior
The ServiceEntry created is lastword.webapp-identity.global
@wenxian Is there a spec that states deployment name ends with env
if it has a -
?. I will change this to feature as it's not a bug.