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

[repo] Helm templating creates wrong default connector image name #106

Closed
legoguy1000 opened this issue Dec 10, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@legoguy1000
Copy link

Describe the bug a clear and concise description of what the bug is.

By default the helm templating creates a image path of opencti/<connector name>:<app version> however the actual path is opencti/connector-<connect name>:<app version>

What's your helm version?

3.16.3

What's your kubectl version?

v1.31.3

Chart version

1.7.3

Explain bug

By default the helm templating creates a image path of opencti/<connector name>:<app version> however the actual path is opencti/connector-<connect name>:<app version>

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?


 elasticsearch:
    enabled: false
  minio:
    enabled: false
  opensearch:
    enabled: false
  connectors:
    - name: urlhaus
      enabled: true
      image: {}
      env:
        CONNECTOR_EXPOSE_METRICS: false

Enter the command that you execute when chart failing/misfunctioning

helm template -f .......

More info

No response

@legoguy1000 legoguy1000 added the bug Something isn't working label Dec 10, 2024
@ialejandro
Copy link
Member

@legoguy1000 Thank you for reaching out regarding this bug report. I understand your concerns about the current image handling implementation, particularly regarding the hardcoded OpenCTI image references.

For the immediate fix, please rename urlhaus to connector-urlhaus, as this name is also used for the image reference.

TL;DR

Regarding the longer-term solution, I agree that we should make the connector system more flexible to accommodate custom-developed connectors. I propose removing the opencti reference from the current condition:

"{{- if and .image (hasKey .image "repository") }}{{ .image.repository }}{{- else if $.Values.global.imageRegistry }}{{ printf "%s/opencti/%s" $.Values.global.imageRegistry .name }}{{- else }}{{ printf "opencti/%s" .name }}{{- end }}:{{ if and .image (hasKey .image "tag") }}{{ .image.tag | default $.Chart.AppVersion }}{{ else }}{{ $.Chart.AppVersion }}{{ end }}"

This change would give users the freedom to specify any repository and image for their connectors. While it may require more configuration for users who exclusively use OpenCTI connectors, this approach offers greater flexibility for integrating third-party or custom-developed connectors in the future.

This modification aligns with our goal of making the system more extensible and accommodating to community-developed connectors while maintaining compatibility with existing OpenCTI implementations.

@legoguy1000
Copy link
Author

I actually like the template, I just didn't think to add connector- in front of the name. I was under the impression the name should match the actual name just based off the example but I guess it doesn't matter. I'll close this.

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
None yet
Development

No branches or pull requests

3 participants