Configuration Questions #10

Closed
opened 2023-09-15 11:11:50 +00:00 by xeruf · 19 comments
Contributor

@vlasov-y since you originally created the chart, two questions for you:

  • why two ingress configs? should I duplicate the config if I want both on the same domain?
  • is there a config to use an existing volume claim for storing the files? In k8s@home I used something like:
    persistence:
      files:
        enabled: true
        existingClaim: vikunja-files

These questions are in light of my migration from the decomissioned k8s@home chart:
https://github.com/k8s-at-home/charts/tree/master/charts/stable/vikunja#values

@vlasov-y since you originally created the chart, two questions for you: - why two ingress configs? should I duplicate the config if I want both on the same domain? - is there a config to use an existing volume claim for storing the files? In k8s@home I used something like: ```yaml persistence: files: enabled: true existingClaim: vikunja-files ``` These questions are in light of my migration from the decomissioned k8s@home chart: https://github.com/k8s-at-home/charts/tree/master/charts/stable/vikunja#values
Member

why two ingress configs? should I duplicate the config if I want both on the same domain?

It is very hard to proxy to application on the same domain, because usually application are not ready to work under subpath different than /. Usually, two domains are used. If user wants a combined Ingress, he can use raw functionality to create a custom Ingress object.

is there a config to use an existing volume claim for storing the files? In k8s@home I used something like:

No, that is not implemented. I can do that for you, if you want.

> why two ingress configs? should I duplicate the config if I want both on the same domain? It is very hard to proxy to application on the same domain, because usually application are not ready to work under subpath different than /. Usually, two domains are used. If user wants a combined Ingress, he can use raw functionality to create a custom Ingress object. > is there a config to use an existing volume claim for storing the files? In k8s@home I used something like: No, that is not implemented. I can do that for you, if you want.
Member

Oops... I thought that I will push to my mirror repository but I push to the real one 😄
5d4142c5bd

@konrad if you want, you can revoke my permissions from the original repository, because build is already succeeded and replaced version 0.2.1, because I have forgotten to increment it 😄

Oops... I thought that I will push to my mirror repository but I push to the real one 😄 https://kolaente.dev/vikunja/helm-chart/commit/5d4142c5bdc0979a84a63a1c5f919498fbd5e223 @konrad if you want, you can revoke my permissions from the original repository, because build is already succeeded and replaced version 0.2.1, because I have forgotten to increment it 😄
Member

Anyway, these changes should not cause any issues.

Anyway, these changes should not cause any issues.
Owner

It is very hard to proxy to application on the same domain, because usually application are not ready to work under subpath different than /.

Usually, two domains are used.

Actually, I've intended the setup so that it's set up on a single (sub)domain.

If user wants a combined Ingress, he can use raw functionality to create a custom Ingress object.

I've used something like this for a similar setup with api and frontend in other projects:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: fancy-project
  annotations:
    acme.cert-manager.io/http01-edit-in-place: 'true'
    cert-manager.io/cluster-issuer: letsencrypt
spec:
  rules:
  - host: fancy-project-preview.dev
    http:
      paths:
        - pathType: Prefix
          path: /api/v1/
          backend:
            service:
              name: api-service
              port:
                number: 8000
        - pathType: Prefix
          path: /
          backend:
            service:
              name: frontend-service
              port:
                number: 80
  tls:
  - hosts:
    - fancy-project-preview.dev
    secretName: fancy-project-preview-ingress-cert

Couldn't we adopt something similar for this chart?

> It is very hard to proxy to application on the same domain, because usually application are not ready to work under subpath different than /. > Usually, two domains are used. Actually, I've intended the setup so that it's set up on a single (sub)domain. > If user wants a combined Ingress, he can use raw functionality to create a custom Ingress object. I've used something like this for a similar setup with api and frontend in other projects: ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: fancy-project annotations: acme.cert-manager.io/http01-edit-in-place: 'true' cert-manager.io/cluster-issuer: letsencrypt spec: rules: - host: fancy-project-preview.dev http: paths: - pathType: Prefix path: /api/v1/ backend: service: name: api-service port: number: 8000 - pathType: Prefix path: / backend: service: name: frontend-service port: number: 80 tls: - hosts: - fancy-project-preview.dev secretName: fancy-project-preview-ingress-cert ``` Couldn't we adopt something similar for this chart?
Owner

if you want, you can revoke my permissions from the original repository, because build is already succeeded and replaced version 0.2.1, because I have forgotten to increment it 😄

I've revoked your push access to the main branch now, but you should still be able to create new branches or merge PRs.

I'll increment and release a new version with your changes.

> if you want, you can revoke my permissions from the original repository, because build is already succeeded and replaced version 0.2.1, because I have forgotten to increment it 😄 I've revoked your push access to the main branch now, but you should still be able to create new branches or merge PRs. I'll increment and release a new version with your changes.
Author
Contributor

Thanks for the prompt reaction!
Yes I would appreciate an easy way to deploy api and backend on the same domain, maybe we can check k8s@home and truecharts on that as well since they both do that too afaik.

Thanks for the prompt reaction! Yes I would appreciate an easy way to deploy api and backend on the same domain, maybe we can check k8s@home and truecharts on that as well since they both do that too afaik.
Member

@konrad I will appreciate if you help and point us to configuration ENV variables that allow configuring URI path to use, so I could update the chart adding extra configuration to both API and WEB parts.
FYI @xeruf

@konrad I will appreciate if you help and point us to configuration ENV variables that allow configuring URI path to use, so I could update the chart adding extra configuration to both API and WEB parts. FYI @xeruf
Member

It is very hard to proxy to application on the same domain, because usually application are not ready to work under subpath different than /.

Usually, two domains are used.

Actually, I've intended the setup so that it's set up on a single (sub)domain.

If user wants a combined Ingress, he can use raw functionality to create a custom Ingress object.

I've used something like this for a similar setup with api and frontend in other projects:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: fancy-project
  annotations:
    acme.cert-manager.io/http01-edit-in-place: 'true'
    cert-manager.io/cluster-issuer: letsencrypt
spec:
  rules:
  - host: fancy-project-preview.dev
    http:
      paths:
        - pathType: Prefix
          path: /api/v1/
          backend:
            service:
              name: api-service
              port:
                number: 8000
        - pathType: Prefix
          path: /
          backend:
            service:
              name: frontend-service
              port:
                number: 80
  tls:
  - hosts:
    - fancy-project-preview.dev
    secretName: fancy-project-preview-ingress-cert

Couldn't we adopt something similar for this chart?

Sorry, missed this message.

Does it mean, that no extra configuration is needed and we can host on one domain out of the box?

> > It is very hard to proxy to application on the same domain, because usually application are not ready to work under subpath different than /. > > > Usually, two domains are used. > > Actually, I've intended the setup so that it's set up on a single (sub)domain. > > > If user wants a combined Ingress, he can use raw functionality to create a custom Ingress object. > > I've used something like this for a similar setup with api and frontend in other projects: > > ```yaml > apiVersion: networking.k8s.io/v1 > kind: Ingress > metadata: > name: fancy-project > annotations: > acme.cert-manager.io/http01-edit-in-place: 'true' > cert-manager.io/cluster-issuer: letsencrypt > spec: > rules: > - host: fancy-project-preview.dev > http: > paths: > - pathType: Prefix > path: /api/v1/ > backend: > service: > name: api-service > port: > number: 8000 > - pathType: Prefix > path: / > backend: > service: > name: frontend-service > port: > number: 80 > tls: > - hosts: > - fancy-project-preview.dev > secretName: fancy-project-preview-ingress-cert > ``` > > Couldn't we adopt something similar for this chart? Sorry, missed this message. Does it mean, that no extra configuration is needed and we can host on one domain out of the box?
Owner

I will appreciate if you help and point us to configuration ENV variables that allow configuring URI path to use, so I could update the chart adding extra configuration to both API and WEB parts.

Which one, the api or frontend url?

Does it mean, that no extra configuration is needed and we can host on one domain out of the box?

It should do that, yes.

> I will appreciate if you help and point us to configuration ENV variables that allow configuring URI path to use, so I could update the chart adding extra configuration to both API and WEB parts. Which one, the api or frontend url? > Does it mean, that no extra configuration is needed and we can host on one domain out of the box? It should do that, yes.
Author
Contributor

Related issue: Configuring config.service without the interface key breaks the deployment, which is kinda unexpected, I guess it should use a default?

Helm install failed: template: vikunja/templates/api/deployment.yaml:55:36: executing "vikunja/templates/api/deployment.yaml" at <.Values.api.config.service.interface>: can't evaluate field service in type interface {} 
Related issue: Configuring config.service without the interface key breaks the deployment, which is kinda unexpected, I guess it should use a default? Helm install failed: template: vikunja/templates/api/deployment.yaml:55:36: executing "vikunja/templates/api/deployment.yaml" at <.Values.api.config.service.interface>: can't evaluate field service in type interface {}
Owner

@xeruf isn't that a yaml error?

@xeruf isn't that a yaml error?
Author
Contributor

Not really, the deployment.yaml contains a helm expression that expects the interface value to be set. It seems that it is merely lacking a default.

Not really, the `deployment.yaml` contains a helm expression that expects the `interface` value to be set. It seems that it is merely lacking a default.
Member

@xeruf There is a default value, but I assume, you have set interface to value that does not contain port, or you set it to empty.

https://kolaente.dev/vikunja/helm-chart/src/branch/main/values.yaml#L145

@xeruf There is a default value, but I assume, you have set interface to value that does not contain port, or you set it to empty. https://kolaente.dev/vikunja/helm-chart/src/branch/main/values.yaml#L145
Contributor

@konrad using two Ingress objects more easily decouples the api from the frontend, incase a user would (for some reason) just want to stand up either the API or the Frontend. That way, they could have an individual Ingress for each.

If you don't see a reason why a user would ever want to set up just one part of Vikunja, I can implement that change as well.

That way, you can do something like this :)

@konrad using two `Ingress` objects more easily decouples the `api` from the `frontend`, incase a user would (for some reason) just want to stand up **either** the API or the Frontend. That way, they could have an individual `Ingress` for each. If you don't see a reason why a user would ever want to set up just one part of Vikunja, I can implement that change as well. That way, you can do something like [this](https://kolaente.dev/perfectra1n/helm-chart/src/branch/new-helm-chart/values.yaml#L18-L57) :)
Owner

@perfectra1n But won't the helm chart install both the api and frontend anyway? Then only exposing one of them doesn't make sense.

IMHO, while it can makes sense to run only one part of Vikunja, I don't think it makes sense to do that for people looking to install the helm chart.

@perfectra1n But won't the helm chart install both the api and frontend anyway? Then only exposing one of them doesn't make sense. IMHO, while it can makes sense to run only one part of Vikunja, I don't think it makes sense to do that for people looking to install the helm chart.
Contributor

No, the Helm chart could run only an API pod, or only a Frontend pod if configured as such in the values.yaml of the “new” Helm chart :). @konrad

But if you would still like to require both, I could do so!

No, the Helm chart could run *only* an API pod, or *only* a Frontend pod if configured as such in the values.yaml of the “new” Helm chart :). @konrad But if you would still like to require both, I could do so!
Author
Contributor

As long as it is easy to configure both running on the same domain, I wouldn't mind. Separation could be useful at some point.

As long as it is easy to configure both running on the same domain, I wouldn't mind. Separation could be useful at some point.
Owner

I’m with xeruf here, as long as it’s easy to configure it could be a good idea to enable separation. Deploying both should still be the default though.

I’m with xeruf here, as long as it’s easy to configure it could be a good idea to enable separation. Deploying both should still be the default though.
Owner

Closing as I think this is resolved with the new chart, please ping if you think it's not.

Closing as I think this is resolved with the new chart, please ping if you think it's not.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/helm-chart#10
No description provided.