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

metadata is defined as object in CRDs and generated Json Schemas #4038

Open
1 task done
adusumillipraveen opened this issue Jul 5, 2023 · 2 comments
Open
1 task done
Labels
blocked/upstream Blocked by an upstream dependency or issue

Comments

@adusumillipraveen
Copy link

Describe the bug

metadata:
  type: object

Steps to reproduce

  1. Install flux with cli generated manifets
  2. Add a ImagePolicy with broken metadata to flux config like:
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImagePolicy
metadata:
  name: demo-civil-citizen-ui
  annotations:
  hmcts.github.com/prod-automated: false
  1. Validate the schema using kubeconform and it works
  2. But kustomize controller will fail validation when applying the changes.

Expected behavior

  • Json Schema and CRD to have full definition for metadata

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

N/A

Flux check

N/A

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@stefanprodan
Copy link
Member

We use Kubernetes controller-gen to generate the CRDs and schema from Go code. The metadata field comes from Kubernetes apimachinery, so I guess this needs to change upstream as we have no control over it. See https://github.com/fluxcd/kustomize-controller/blob/main/api/v1/kustomization_types.go#L300

@adusumillipraveen
Copy link
Author

Looks like there is a relevant issue on it already, will add my comments there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/upstream Blocked by an upstream dependency or issue
Projects
None yet
Development

No branches or pull requests

2 participants