Skip to content

Existing Secrets should be updated not replaced #192

Closed

Description

@hobti01

/kind bug

What happened:
Existing Secret is overwritten by cert-manager.

What you expected to happen:
Existing Secret (with invalid tls.crt and tls.key) is updated with tls cert and key.

How to reproduce it (as minimally and precisely as possible):
Create Secret and Ingress

apiVersion: v1
kind: Secret
metadata:
  labels:
    my: special-labels-that-should-be-retained
    because: they-are-set-by-my-helm-chart
  name: some-secret
type: kubernetes.io/tls
data:
  tls.crt: Cg==
  tls.key: Cg==
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: some-ingress
spec:
  rules:
    - host: some.host
      http:
        paths:
          - path: /
            backend:
              serviceName: some-service
              servicePort: 8080
  tls:
    # Name of the secret ~~updated~~ replaced by cert-manager
    - secretName: some-secret
      hosts:
        - some.host

Anything else we need to know?:
Great work on the project!

Environment:
$ kubectl version --short
Client Version: v1.8.2
Server Version: v1.8.1+coreos.0

Activity

  1. added
    kind/bug
    on Nov 7, 2017
  2. added this to the v0.2 milestone on Nov 7, 2017
  3. added a commit that references this issue on Dec 2, 2017
    ebec818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions