Helm install not working with both helm and deployment.yaml #457

Closed
opened 2023-06-16 16:06:09 +00:00 by patrick-men · 2 comments
patrick-men commented 2023-06-16 16:06:09 +00:00 (Migrated from gitea.com)

The k8s version used here:
Client Version: v1.27.2
Kustomize Version: v5.0.1
Server Version: v1.27.2

When installing gitea with helm install gitea-charts/gitea -n gitea, without a values.yaml file, the installation fails:

Screenshot Kubernetes Dashboard - Without Values - Error Pod gitea-0

Screenshot Kubernetes Dashboard - Without Values - Error Pod gitea-postgresql-0

When done with helm install -f values.yaml gitea-charts/gitea -n gitea where a persistent volume is set:

Screenshot Kubernetes Dashboard - With Values - Error Pod gitea-0

Screenshot Kubernetes Dashboard - With Values - Error Pod gitea-postgresql-0

values.yaml:

persistence:
  enabled: true
  existingClaim: gitea-claim

values2.yaml (this failed with the same errors)

persistence:
  enabled: true
  existingClaim: gitea-claim-data
  storageClass: gitea-manual-data
  size: 75Gi
  accessModes:
    - ReadWriteOnce
  storageClass: gitea-manual

Furthermore, there was an issue when attempting to deploy gitea using a deployment.yaml. Behind this is an ingress that exposes it to the internet - the ingress also exposes other services and is working.

This method failed after the "Install gitea" button on the initial setup. It would load (staying on the setup page, not showing the cup animation) for 1-2 minutes before ending in an 504 Error.

deployment.yaml > i've tried different values for mountPath, none of them lead farther then mentioned above.

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: gitea
  name: gitea
  namespace: gitea
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gitea
  template:
    metadata:
      labels:
        app: gitea
    spec:
      containers:
        - image: gitea/gitea:latest
          name: gitea
          volumeMounts:
            - mountPath: "/data"
              name: gitea-volume-data
      #     volumeMounts:
      #       - mountPath: /data/gitea
      #         name: gitea-volume-config

      volumes:
      - name: gitea-volume-data
        persistentVolumeClaim:
          claimName: gitea-claim-data
      # - name: gitea-volume-config
      #   persistentVolumeClaim:
      #     claimName: gitea-claim-conf

Error given by kubectl logs -f gitea-XXXXXXXX-XXXXX - gitea

Generating /data/ssh/ssh_host_ed25519_key...
Generating /data/ssh/ssh_host_rsa_key...
Generating /data/ssh/ssh_host_ecdsa_key...
Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
2023/06/16 15:00:12 cmd/web.go:123:runWeb() [I] Starting Gitea on PID: 17
2023/06/16 15:00:13 ...s/install/setting.go:22:PreloadSettings() [I] AppPath: /usr/local/bin/gitea
2023/06/16 15:00:13 ...s/install/setting.go:23:PreloadSettings() [I] AppWorkPath: /app/gitea
2023/06/16 15:00:13 ...s/install/setting.go:24:PreloadSettings() [I] Custom path: /data/gitea
2023/06/16 15:00:13 ...s/install/setting.go:25:PreloadSettings() [I] Log path: /data/gitea/log
2023/06/16 15:00:13 ...s/install/setting.go:26:PreloadSettings() [I] Configuration file: /data/gitea/conf/app.ini
2023/06/16 15:00:13 ...s/install/setting.go:27:PreloadSettings() [I] Prepare to run install page
2023/06/16 15:00:13 ...s/install/setting.go:30:PreloadSettings() [I] SQLite3 is supported
2023/06/16 15:00:13 cmd/web.go:235:listen() [I] Listen: http://0.0.0.0:3000
2023/06/16 15:00:13 cmd/web.go:239:listen() [I] AppURL(ROOT_URL): http://localhost:3000/
2023/06/16 15:00:13 ...s/graceful/server.go:62:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 17
2023/06/16 15:11:52 .../context_response.go:92:HTML() [E] Render failed: failed to render template: install, error: write tcp 10.244.0.174:3000->10.244.0.83:48918: write: broken pipe
2023/06/16 15:11:52 .../context_response.go:94:HTML() [E] plainTextInternal (status=500): write bytes failed: write tcp 10.244.0.174:3000->10.244.0.83:48918: write: broken pipe

If need be or if it's more convenient, you can reach me over Discord (this issue was made after being advised so by techknowlogick)

The k8s version used here: Client Version: v1.27.2 Kustomize Version: v5.0.1 Server Version: v1.27.2 When installing gitea with ```helm install gitea-charts/gitea -n gitea```, without a values.yaml file, the installation fails: ![Screenshot Kubernetes Dashboard - Without Values - Error Pod gitea-0](/attachments/b5e48ba9-37a8-48d5-a70c-d05a0015d0cb) ![Screenshot Kubernetes Dashboard - Without Values - Error Pod gitea-postgresql-0](/attachments/bddb6f4f-323f-4019-8c88-1053ea7c5a31) When done with ```helm install -f values.yaml gitea-charts/gitea -n gitea``` where a persistent volume is set: ![Screenshot Kubernetes Dashboard - With Values - Error Pod gitea-0](/attachments/d698e1fa-77d5-401c-899a-130356961359) ![Screenshot Kubernetes Dashboard - With Values - Error Pod gitea-postgresql-0](/attachments/3180fd93-bb6e-4ff0-bc57-2b2b433bf48d) values.yaml: ```yaml persistence: enabled: true existingClaim: gitea-claim ``` values2.yaml (this failed with the same errors) ```yaml persistence: enabled: true existingClaim: gitea-claim-data storageClass: gitea-manual-data size: 75Gi accessModes: - ReadWriteOnce storageClass: gitea-manual ``` Furthermore, there was an issue when attempting to deploy gitea using a deployment.yaml. Behind this is an ingress that exposes it to the internet - the ingress also exposes other services and is working. This method failed after the "Install gitea" button on the initial setup. It would load (staying on the setup page, not showing the cup animation) for 1-2 minutes before ending in an 504 Error. deployment.yaml > i've tried different values for mountPath, none of them lead farther then mentioned above. ```yaml apiVersion: apps/v1 kind: Deployment metadata: labels: app: gitea name: gitea namespace: gitea spec: replicas: 1 selector: matchLabels: app: gitea template: metadata: labels: app: gitea spec: containers: - image: gitea/gitea:latest name: gitea volumeMounts: - mountPath: "/data" name: gitea-volume-data # volumeMounts: # - mountPath: /data/gitea # name: gitea-volume-config volumes: - name: gitea-volume-data persistentVolumeClaim: claimName: gitea-claim-data # - name: gitea-volume-config # persistentVolumeClaim: # claimName: gitea-claim-conf ``` Error given by ```kubectl logs -f gitea-XXXXXXXX-XXXXX - gitea``` ``` Generating /data/ssh/ssh_host_ed25519_key... Generating /data/ssh/ssh_host_rsa_key... Generating /data/ssh/ssh_host_ecdsa_key... Server listening on :: port 22. Server listening on 0.0.0.0 port 22. 2023/06/16 15:00:12 cmd/web.go:123:runWeb() [I] Starting Gitea on PID: 17 2023/06/16 15:00:13 ...s/install/setting.go:22:PreloadSettings() [I] AppPath: /usr/local/bin/gitea 2023/06/16 15:00:13 ...s/install/setting.go:23:PreloadSettings() [I] AppWorkPath: /app/gitea 2023/06/16 15:00:13 ...s/install/setting.go:24:PreloadSettings() [I] Custom path: /data/gitea 2023/06/16 15:00:13 ...s/install/setting.go:25:PreloadSettings() [I] Log path: /data/gitea/log 2023/06/16 15:00:13 ...s/install/setting.go:26:PreloadSettings() [I] Configuration file: /data/gitea/conf/app.ini 2023/06/16 15:00:13 ...s/install/setting.go:27:PreloadSettings() [I] Prepare to run install page 2023/06/16 15:00:13 ...s/install/setting.go:30:PreloadSettings() [I] SQLite3 is supported 2023/06/16 15:00:13 cmd/web.go:235:listen() [I] Listen: http://0.0.0.0:3000 2023/06/16 15:00:13 cmd/web.go:239:listen() [I] AppURL(ROOT_URL): http://localhost:3000/ 2023/06/16 15:00:13 ...s/graceful/server.go:62:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 17 2023/06/16 15:11:52 .../context_response.go:92:HTML() [E] Render failed: failed to render template: install, error: write tcp 10.244.0.174:3000->10.244.0.83:48918: write: broken pipe 2023/06/16 15:11:52 .../context_response.go:94:HTML() [E] plainTextInternal (status=500): write bytes failed: write tcp 10.244.0.174:3000->10.244.0.83:48918: write: broken pipe ``` If need be or if it's more convenient, you can reach me over Discord (this issue was made after being advised so by techknowlogick)
pat-s commented 2023-06-17 20:26:30 +00:00 (Migrated from gitea.com)
  1. There are issues with your PVC creation that you need to debug yourself -> describe your PVC and see what the issue is. It's most likely not a chart issue as many others successfully use this chart including a PVC spawned from it. In either case, logs are preferred over screenshots :)

  2. Gitea is currently using a statefulset within the chart. There is no need for a manual deployment on the side - I don't understand what you want to achieve. Helm charts are fully packaged installation recipes without the need for additional components. We can't help you if you go off-road :)

When installing gitea with helm install gitea-charts/gitea -n gitea, without a values.yaml file, the installation fails:

You always want a values file as there are certain settings you must / should change for a functional deployment. But again I don't think that the lack of the values file is the issue here as you also get the same PVC error with it.

1. There are issues with your PVC creation that you need to debug yourself -> describe your PVC and see what the issue is. It's most likely not a chart issue as many others successfully use this chart including a PVC spawned from it. In either case, logs are preferred over screenshots :) 2. Gitea is currently using a statefulset within the chart. There is no need for a manual deployment on the side - I don't understand what you want to achieve. Helm charts are fully packaged installation recipes without the need for additional components. We can't help you if you go off-road :) > When installing gitea with helm install gitea-charts/gitea -n gitea, without a values.yaml file, the installation fails: You always want a values file as there are certain settings you *must* / should change for a functional deployment. But again I don't think that the lack of the values file is the issue here as you also get the same PVC error with it.
pat-s commented 2023-07-12 08:51:01 +00:00 (Migrated from gitea.com)

Stale -> closing, feel free to re-open if needed.

Stale -> closing, feel free to re-open if needed.
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#457
No description provided.