Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS custom secret with period in name does not work #1255

Closed
richardbolt opened this issue Feb 26, 2019 · 1 comment · Fixed by #1664
Closed

TLS custom secret with period in name does not work #1255

richardbolt opened this issue Feb 26, 2019 · 1 comment · Fixed by #1664
Milestone

Comments

@richardbolt
Copy link

Describe the bug
When your custom TLS secret name has a period (.) in the name Ambassador will fail to start Envoy and will error thinking the first part before the period is the secret name. Quoting the secret name in the annotation does not make a difference.

RichStatus BAD error=TLSContext server found no certificate in secret with in namespace period, ignoring...

Bad Module/tls configuration:

  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v1
      kind:  Module
      name:  tls
      config:
        server:
          enabled: True
          secret: with.period

Good configuration:

  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v1
      kind:  Module
      name:  tls
      config:
        server:
          enabled: True
          secret: withoutperiod

To Reproduce
Create a secret with a name of "with.period" and appropriate tls.key and tls.cert values
Apply the "Bad" example Module/tls annotation
Observe the error in Ambassador logs and the diagnostics UI

Expected behavior
The "with.period" secret should be read as specified in the Module/tls annotation and Ambassador should successfully start Envoy

Versions (please complete the following information):

  • Ambassador: 0.50.3
  • Kubernetes environment: AKS
  • Version: 1.12.5

Additional context
Secrets with periods in the name were working successfully in Ambassador 0.40.2

@richardbolt richardbolt changed the title TLS custom secret with period does not work TLS custom secret with period in name does not work Feb 26, 2019
@kflynn kflynn added this to the pedrera milestone May 9, 2019
@kflynn kflynn modified the milestones: pedrera, sagrada-familia May 20, 2019
@kflynn kflynn modified the milestones: sagrada-familia, santa-cruz Jun 6, 2019
@kflynn kflynn removed this from the santa-cruz milestone Jun 18, 2019
@kflynn kflynn added this to the santa-cruz milestone Jul 2, 2019
@kflynn kflynn reopened this Jul 2, 2019
@kflynn kflynn closed this as completed Jul 11, 2019
@ksummersill2
Copy link

Wanted to update this with the documentation: https://www.getambassador.io/docs/1.4/topics/running/tls/#tlscontext
If you run a secret with a specific namespace make sure to add in the:
secret_namespacing: true

Make sure that the secret identified in the format:
secret: <secretName>.<namespace>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants