Kubernetes issue - cannot find license

Hello,
I am about to get very angry with this error. In general I try to deploy on digitalocean (kubernetes) after docker compose + convert to yaml files.

My deployment.yaml:

initContainers:
- name: pgsql-data-permission-fix
image: busybox
command: ["/bin/chmod","-R",“777”, “/var/www/passbolt/config/gpg”]
volumeMounts:
- mountPath: /var/www/passbolt/config/gpg
name: gpg-volume
- mountPath: /var/www/passbolt/config
name: passbolt-claim2
- mountPath: /var/www/passbolt/webroot/img/public
name: images-volume
- mountPath: /run
name: passbolt-tmpfs0
restartPolicy: Always
serviceAccountName: “”
volumes:
- name: gpg-volume
persistentVolumeClaim:
claimName: gpg-volume
- name: passbolt-claim2
configMap:
name: passbolt-license
items:
- key: license
path: license
- name: images-volume
persistentVolumeClaim:
claimName: images-volume
- emptyDir:
medium: Memory
name: passbolt-tmpfs0
status: {}

My license configmap:

[root@localhost passbolt_docker]# kubectl get configmap passbolt-license -o yaml
apiVersion: v1
data:
license: |
{{ data here }}
kind: ConfigMap
metadata:
creationTimestamp: “2020-09-01T05:33:33Z”
managedFields:

  • apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
    f:data:
    .: {}
    f:license: {}
    manager: kubectl-create
    operation: Update
    time: “2020-09-01T05:33:33Z”
    name: passbolt-license
    namespace: default
    resourceVersion: “454338”

The error I get:

kubectl logs passbolt-7fcfd9d4b6-wdhft


License error: License not found in /var/www/passbolt/config/license

I tried different methods and always get that license error.

Hello,
I managed to fix my issues by simply doing this:

volumeMounts:
- name: license-config
mountPath: /var/www/passbolt/config/license
subPath: license
- mountPath: /run
name: passbolt-tmpfs0
restartPolicy: Always
serviceAccountName: “”
volumes:
- name: license-config
configMap:
name: license-config-v1
- emptyDir:
medium: Memory
name: passbolt-tmpfs0

Thanks!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.