nextcloud / nextcloud/helm

changing containerPort doesn't affect apache

Open
#363 18 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

apache
Dominant language
Go Template
Stars
534
Forks
314
Avg merge
42m
Merged PRs (30d)
1

Description

Describe your Issue

setting nextcloud.containerPort value doesn't change the Port apache httpd is listening to. it only changes the container Port in the deployment yaml, while the apache config still uses Port 80

Logs and Errors

nextcloud pod logs:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.244.0.103. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

Describe your Environment

  • Kubernetes distribution: talos v1.2.7, kubernetes 1.26.0

  • storage class: hetzner storagebox mounted with smb storage class.

  • Helm Version (or App that manages helm): helm version 3.11.2

  • Helm Chart Version: 3.5.3

  • values.yaml:

nextcloud:
  host: cloud.example.com
  configs:
    custom.config.php: |-
      <?php
      $CONFIG = array (
        'overwriteprotocol' => 'https',
        'overwrite.cli.url' => 'https://cloud.example.com',
        'filelocking.enabled' => 'true',
        'loglevel' => '0',
        'enable_previews' => false
      );
  securityContext:
    runAsUser: 1001
    runAsGroup: 1001
  containerPort: 8080
replicaCount: 1
internalDatabase:
  enabled: false
mariadb:
  enabled: true
  primary:
    persistence:
      enabled: true
persistence:
  enabled: true
readinessProbe:
  enabled: false
livenessProbe:
  enabled: false

Additional context, if any

I use a hetzner storage box for my kubernetes storage. It's mounted with a smb storage class. This is my storageClass definition:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: storagebox
  namespace: storage
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
provisioner: smb.csi.k8s.io
parameters:
  source: "//xyz.your-storagebox.de/xyz"
  csi.storage.k8s.io/provisioner-secret-name: "smbcreds"
  csi.storage.k8s.io/provisioner-secret-namespace: "storage"
  csi.storage.k8s.io/node-stage-secret-name: "smbcreds"
  csi.storage.k8s.io/node-stage-secret-namespace: "storage"
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
  - dir_mode=0777
  - file_mode=0777
  - uid=1001
  - gid=1001
  - cache=loose
  - actimeo=30
  - noserverino

Due to permission issues, User and UserGroup are set to 1001 in nextcloud. I don't think the storage class itself is the issue, but the container port, that isn't configured completely

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with values.yaml and the chart's rendered deployment YAML, then inspect where the Apache listening port is configured. Verify that changing nextcloud.containerPort updates both Kubernetes and Apache and that the pod starts without the port-binding errors shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.