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

Add TLS configuration in the ingress trait #5635

Closed
romain-pfund opened this issue Jun 14, 2024 · 5 comments · Fixed by #5650
Closed

Add TLS configuration in the ingress trait #5635

romain-pfund opened this issue Jun 14, 2024 · 5 comments · Fixed by #5650
Labels
area/traits good first issue Does not require full understanding of the codebase kind/feature New feature or request

Comments

@romain-pfund
Copy link
Contributor

Requirement

As an integration developper using camel-k, I want to user TLS on my ingresses so I can securely contact my camel-k integrations

Problem

To fully configure TLS on an ingress, we need to set the spec.tls part (hosts and secretName).
https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
But this is actually not covered by the actual ingress trait

Proposal

Implement this configuration properties:

ingress.tls.hosts      |  list[string]
ingress.tls.secretName |  string

to set

apiVersion: networking.k8s.io/v1
kind: Ingress
...
spec:
  tls:
  - hosts:
      - {{ingress.tls.hosts[]}}
    secretName: {{ingress.tls.secretName}}
 ...

Open questions

No response

@romain-pfund romain-pfund added the kind/feature New feature or request label Jun 14, 2024
@squakez squakez added area/traits good first issue Does not require full understanding of the codebase labels Jun 14, 2024
@squakez
Copy link
Contributor

squakez commented Jun 14, 2024

Thanks. Contributions are welcomed as usual!

@romain-pfund
Copy link
Contributor Author

I've never done Go development, I may look at it this weekend or monday
From what I saw, I mainly on

  • pkg/apis/camel/v1/trait/ingress.go
  • pkg/trait/ingress.go
  • pkg/trait/ingress_test.go

@squakez
Copy link
Contributor

squakez commented Jun 14, 2024

I've never done Go development, I may look at it this weekend or monday From what I saw, I mainly on

* pkg/apis/camel/v1/trait/ingress.go

* pkg/trait/ingress.go

* pkg/trait/ingress_test.go

Yeah, that's correct. This particular development should not require the knowledge of the entire operator. If the unit tests are passing, then, we should be fine. Have a look at https://camel.apache.org/camel-k/next/contributing/developers.html and feel free to ping either here on in Zulip chat to get any support.

@romain-pfund
Copy link
Contributor Author

romain-pfund commented Jun 17, 2024

hi,
got trouble to test it on minikube.
I've updated the 3 files, add a test in pkg/trait/ingress_test.go which is passing

From https://camel.apache.org/camel-k/2.3.x/contributing/developers.html#_for_minikube, ran

make
make images
./kamel install -olm=false

but I keep having
Integration in version "v1" cannot be handled as a Integration: strict decoding error: unknown field "spec.traits.ingress.tlsHosts"

sure I'm missing a simple thing

@squakez
Copy link
Contributor

squakez commented Jun 17, 2024

Ah, yes, you need to make generate before making the image in order to regen the CRDs.

@squakez squakez linked a pull request Jun 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/traits good first issue Does not require full understanding of the codebase kind/feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants