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

Exporter configuration via Helm Chart doesn't sync crdsToDiscover and overwriteCrdsActions options #86

Open
irizzant opened this issue Nov 13, 2024 · 4 comments

Comments

@irizzant
Copy link

irizzant commented Nov 13, 2024

I have deployed Exporter with Helm chart version 0.2.36 in kubernetes 1.30 with the following helm chart configuration:

overwriteConfigurationOnRestart: true
eventListener:
  type: POLLING
configMap:
  name: config-k8s.yaml
  config:
    crdsToDiscover: ".metadata.ownerReferences[0].kind == \"CompositeResourceDefinition\" and .spec.scope == \"Namespaced\""
    overwriteCrdsActions: false
    resources:
    - kind: v1/namespaces
    .... # omitted for brevity

In Port this configuration translates into:

resources:
    - kind: v1/namespaces
    .... # omitted for brevity

The Kubernetes ConfigMap contains the right configuration, but it's not mirrored in Port though.

This is a problem because if I manually update the kubernetes datasource in Port adding the missing configurations:

crdsToDiscover: ".metadata.ownerReferences[0].kind == \"CompositeResourceDefinition\" and .spec.scope == \"Namespaced\""
    overwriteCrdsActions: false

then at the next restart of the exporter pod the configuration is lost.
On the other end, by setting overwriteConfigurationOnRestart: true I loose the possibility to keep the configuration in sync with Port

@abangser
Copy link

abangser commented Nov 22, 2024

Just adding a plus one and hopefully some helpful context. I have tried doing the same thing and I noticed in the exporter logs that I see:

crd.go:369] Discovering CRDs is disabled

I don't see any env vars or configs that can change this so I wonder if this may be the issue? But here is the config from my helms values file if that helps with the debugging:

configMap.config: |-
  crdsToDiscover: .spec.group == "mydomain.io"
  resources: []

Would love to fully automate my setup with Port and this would seem to do it 🤞

@omby8888
Copy link
Contributor

Hi @abangser, @irizzant ,
Thank you for reporting this issue! it has been resolved in version v0.4.5. Please update to the latest version and let us know if you encounter any further issues.

@abangser
Copy link

abangser commented Nov 25, 2024

Yay! Very exciting, thanks @omby8888 and team for the quick turn around 🎉 Do you have a timeline for a release to your helm chart? I see the code change in the chart, but don't think I see the released chart yet? 🤔

@omby8888
Copy link
Contributor

Hey @abangser, iv'e now also released the helm chart 😄

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

No branches or pull requests

3 participants