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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to expose terrakube service with custom path #700

Open
dawidmalina opened this issue Feb 10, 2024 · 6 comments
Open

Ability to expose terrakube service with custom path #700

dawidmalina opened this issue Feb 10, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@dawidmalina
Copy link

Feature description 馃挕

I see that we can configure: .Values.ingress.api.path, .Values.ingress.registry.path and .Values.ingress.dex.path but not sure how to configure custom path for particular service.

If we would be able to expose api under /api and registry under /registry potentially we could use only one domain instead of three different ones.

Anything else?

No response

@dawidmalina dawidmalina added the enhancement New feature or request label Feb 10, 2024
@alfespa17
Copy link
Member

Hello @dawidmalina

The API and Registry require to be in the root.

I explained that a little bit in this issue, it is restriction when using the Terraform/tofu cli and the well known endpoint.

#452 (comment)

@alfespa17
Copy link
Member

For the ingress configuration you could check the default values here

https://github.com/AzBuilder/terrakube-helm-chart/blob/a1526fe5e3e35dc8a1f12ed6dcce87afc394f2fa/charts/terrakube/values.yaml#L226

In the helm chart repository there is one folder with a couple of examples too

@dawidmalina
Copy link
Author

Thank you for the explanation. I am not familiar with terraform endpoints but /.well-known/terraform.json returns different values (api, registry) or exactly same in this case? You are using nginx as web (ui) and with nginx we can do almost everything :)

@alfespa17
Copy link
Member

alfespa17 commented Feb 10, 2024

The endpoint expose different terraform protocols.

The API expose the login.v1, state.v2, tfe.v2 that are use use when you do a terraform login and when you use the Terraform remote state and cloud block information.

The registry expose the login.v1, modules.v1 and providers.v1 information those are used when the Terraform CLI downloads modules and providers

The response content is different as you can see in the image from the comment in the other issue

@dawidmalina
Copy link
Author

@alfespa17 i just check what endpoints are exposed with tfe and from what I see they are using one front (domain):

Could we use similar approach?

@alfespa17
Copy link
Member

@alfespa17 i just check what endpoints are exposed with tfe and from what I see they are using one front (domain):

Could we use similar approach?

It could work like that in the future, but right now it will require some refactor in the code to change the responses of the well known endpoint and other internal logic inside the registry and the executor I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants