generate a secret when neither authToken nor joinParams.tokenName are provided:
  1: |
    apiVersion: v1
    kind: Secret
    metadata:
      name: teleport-kube-agent-join-token
      namespace: NAMESPACE
    stringData:
      auth-token: ""
    type: Opaque
generates a secret when authToken is provided:
  1: |
    apiVersion: v1
    kind: Secret
    metadata:
      name: teleport-kube-agent-join-token
      namespace: NAMESPACE
    stringData:
      auth-token: |
        sample-auth-token-dont-use-this
    type: Opaque
generates a secret when joinParams.tokenName is provided:
  1: |
    apiVersion: v1
    kind: Secret
    metadata:
      name: teleport-kube-agent-join-token
      namespace: NAMESPACE
    stringData:
      auth-token: |
        sample-auth-token-dont-use-this
    type: Opaque
generates a secret with a custom name when authToken and joinTokenSecret.name are provided:
  1: |
    apiVersion: v1
    kind: Secret
    metadata:
      name: some-other-secret-name
      namespace: NAMESPACE
    stringData:
      auth-token: |
        sample-auth-token-dont-use-this
    type: Opaque
generates a secret with a custom name when authToken and secretName are provided:
  1: |
    apiVersion: v1
    kind: Secret
    metadata:
      name: some-other-secret-name
      namespace: NAMESPACE
    stringData:
      auth-token: |
        sample-auth-token-dont-use-this
    type: Opaque
sets Secret annotations when specified:
  1: |
    apiVersion: v1
    kind: Secret
    metadata:
      annotations:
        kubernetes.io/secret: test-annotation
        kubernetes.io/secret-different: 6
      name: teleport-kube-agent-join-token
      namespace: NAMESPACE
    stringData:
      auth-token: |
        auth-token
    type: Opaque
sets Secret labels when specified:
  1: |
    apiVersion: v1
    kind: Secret
    metadata:
      labels:
        app.kubernetes.io/name: teleport-kube-agent
        resource: secret
      name: teleport-kube-agent-join-token
      namespace: NAMESPACE
    stringData:
      auth-token: |
        auth-token
    type: Opaque
