Skip to content

Conversation

@prospero238
Copy link
Contributor

Summary

The observability guide here includes deployment manifests whose selector.matchLabels does not match the template's metadata.labels. This results in an error when trying to apply the manifest.

Specifically, the error is:

Error from server (Invalid): error when creating "sample-deployment.yaml": Deployment.apps "podtato-head-frontend" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app.kubernetes.io/name":"podtato-head-frontend", "app.kubernetes.io/part-of":"podtato-head", "app.kubernetes.io/version":"0.1.0"}: `selector` does not match template `labels`
Error from server (Invalid): error when creating "sample-deployment.yaml": Deployment.apps "podtato-head-hat" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"app.kubernetes.io/name":"podtato-head-hat", "app.kubernetes.io/part-of":"podtato-head", "app.kubernetes.io/version":"0.1.1"}: `selector` does not match template `labels`

To test, I applied the revised manifests to my cluster and observed that there were no errors, and the desired deployments were created.

Please let me know if there's anything else I need to do to fulfill PR requirements.

Checks

  • My PR fulfills the Definition of Done of the corresponding issue and not more (or parts if the issue is separated
    into multiple PRs)
  • I used descriptive commit messages to help reviewers understand my thought process
  • I signed off all my commits according to the Developer Certificate of Origin (DCO)(
    see Contribution Guide)
  • My PR title is formatted according to the semantic PR conventions described in
    the Contribution Guide
  • My content follows the style guidelines of this project (YAMLLint, markdown-lint)
  • I regenerated the auto-generated docs for Helm and the CRD documentation (if applicable)
  • I have performed a self-review of my content including grammar and typo errors and also checked the rendered page
    from the Netlify deploy preview
  • My changes result in all-green PR checks (first-time contributors need to ask a maintainer to approve their test runs)

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Mar 20, 2025
@prospero238 prospero238 marked this pull request as ready for review March 20, 2025 01:21
@prospero238 prospero238 requested review from a team as code owners March 20, 2025 01:21
@prospero238 prospero238 force-pushed the fix/autoappdiscovery-selector-yaml branch 2 times, most recently from 0664530 to 8a31665 Compare March 20, 2025 01:34
@prospero238 prospero238 force-pushed the fix/autoappdiscovery-selector-yaml branch from 8a31665 to b01c7b3 Compare March 20, 2025 01:42
@sonarqubecloud
Copy link

Copy link
Member

@mowies mowies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mowies mowies merged commit deeb73e into keptn:main Mar 20, 2025
10 checks passed
SandeepD2697 pushed a commit to SandeepD2697/lifecycle-toolkit that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants