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

Bug: Duplicate key annotations under Deployment #2440

Closed
oistein opened this issue Aug 9, 2022 · 4 comments
Closed

Bug: Duplicate key annotations under Deployment #2440

oistein opened this issue Aug 9, 2022 · 4 comments
Labels
bug 🪲 Something isn't working
Milestone

Comments

@oistein
Copy link

oistein commented Aug 9, 2022

Version of Azure Service Operator
Helm Chart v2.0.0-beta.1

Describe the bug
Duplicate pod spec annotations generated for the deployment.

To Reproduce
Steps to reproduce the behavior:

helm template --repo https://raw.githubusercontent.com/Azure/azure-service-operator/main/v2/charts azure-service-operator --version v2.0.0-beta.1 |grep "kind: Deployment" -A20
kind: Deployment
metadata:
  labels:
    app: azure-service-operator-v2
    control-plane: controller-manager
  name: azureserviceoperator-controller-manager
  namespace: azureserviceoperator-system
spec:
  replicas: 1
  selector:
    matchLabels:
      control-plane: controller-manager
  template:
    metadata:
      annotations:
        {}
      annotations:
        kubectl.kubernetes.io/default-logs-container: manager
      labels:
        aadpodidbinding: aso-manager-binding
        control-plane: controller-manager

Expected behavior
deployment.spec.template.metadata.annotations to appear once

This causes the install to fail when installing the helm release via flux. Due to Duplicate YAML Keys here.

@oistein oistein added the bug 🪲 Something isn't working label Aug 9, 2022
@matthchr
Copy link
Member

matthchr commented Aug 9, 2022

Thanks for the bug report @oistein. We'll look into fixing this shortly.

@matthchr
Copy link
Member

This is fixed in the beta.2 chart:

$ helm template --repo https://raw.githubusercontent.com/Azure/azure-service-operator/main/v2/charts azure-service-operator --version v2.0.0-beta.2 |grep "kind: Deployment" -A20

kind: Deployment
metadata:
  labels:
    app: azure-service-operator-v2
    control-plane: controller-manager
  name: azureserviceoperator-controller-manager
  namespace: azureserviceoperator-system
spec:
  replicas: 1
  selector:
    matchLabels:
      control-plane: controller-manager
  template:
    metadata:
      annotations:
        kubectl.kubernetes.io/default-container: manager
      labels:
        aadpodidbinding: aso-manager-binding
        control-plane: controller-manager
    spec:
      containers:

@matthchr matthchr added this to the v2.0.0-beta.2 milestone Aug 16, 2022
@matthchr
Copy link
Member

matthchr commented Aug 16, 2022

Closing this given the fix is in beta.2. Please let us know if you have any other issues with that chart.

@oistein
Copy link
Author

oistein commented Aug 17, 2022

Thanks for the quick fix @matthchr. Will give this another go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
Development

No branches or pull requests

2 participants