Gitea-HelmChart/templates/gitea
cboin1996 0d1f748898 check existence of /data/gitea/conf/ instead of /data/gitea/ (#310)
### Description of the change

Checking the existence of the config directory should be done with the directory path itself. Not its parent directory.

This simple fix addresses that by using the config directory for its existence check.

### Benefits

Prior to #337 there was no other way to install this helm chart using the `extraVolumeMounts` setting with these values:

```yaml
replicaCount: %d

extraVolumes:
  - name: config-volume
    configMap:
      name: %s

extraVolumeMounts:
  - name: config-volume
    mountPath: /data/gitea/templates/custom
```

Without this fix, the Gitea pod would never initialize, and would crashloop with the same error in #296.

### Additional information

Mounting a configMap to `/data/gitea/templates/custom` causes the `/data/gitea` folder to exist even though the `/data/gitea/conf` had not been initialized yet. The initialization script saw that the `/data/gitea` dir existed and exited early without initializing `/data/gitea/conf`.

Co-authored-by: cboin1996 <christianboin@hotmail.com>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/310
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.io>
Reviewed-by: pat-s <pat-s@noreply.gitea.io>
Co-authored-by: cboin1996 <cboin1996@noreply.gitea.io>
Co-committed-by: cboin1996 <cboin1996@noreply.gitea.io>
2022-09-26 04:08:56 +08:00
..
config.yaml Skip processing non-provided additional configs (#336) 2022-08-04 21:46:04 +08:00
deprecation.yaml Add deprecation fail-safe for Chart templating (#269) 2021-12-23 00:25:32 +08:00
http-svc.yaml Allow configuration of ipFamilyPolicy and ipFamilies (#313) 2022-04-25 19:56:25 +08:00
ingress.yaml Enable overriding of ingress api version for systems where detection doesn't work (#252) 2021-12-20 19:54:37 +08:00
init.yaml check existence of /data/gitea/conf/ instead of /data/gitea/ (#310) 2022-09-26 04:08:56 +08:00
servicemonitor.yaml Fixing prometheus monitoring (#157) 2021-06-07 22:28:28 +08:00
ssh-svc.yaml Allow configuration of ipFamilyPolicy and ipFamilies (#313) 2022-04-25 19:56:25 +08:00
statefulset.yaml Split "extraVolumeMounts" into init and container mounts (#337) 2022-08-08 03:32:19 +08:00