Skip to content

If deployment has dash (-), the env will be the last word of the deployment name, not default #133

@wenxian

Description

@wenxian

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions