kubectl logs -n postgres-operator pod/hippo-instance1-vnln-0 -c database-client-cert-init
install: cannot open '/pgconf/tls/replication/tls.crt' for reading: Permission denied
install: cannot open '/pgconf/tls/replication/tls.key' for reading: Permission denied
install: cannot open '/pgconf/tls/replication/ca.crt' for reading: Permission denied
I don't know if this is related, but when dumping the pod yaml, I see a dubious defaultMode for the cert-volume:
name: cert-volume
projected:
defaultMode: 384
I also have a error with backrest pod:
kubectl logs -n postgres-operator pod/hippo-repo-host-0 -c pgbackrest
/etc/ssh/sshd_config: Permission denied
And for this one too, there is a dubious default mode:
- name: ssh
projected:
defaultMode: 32
Did I miss something, or is there some issue with the controller ?
apiVersion: v1
kind: Namespace
metadata:
name: postgres-operator
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
postgres-operator.crunchydata.com/control-plane: postgres-operator
name: pgo
namespace: postgres-operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
postgres-operator.crunchydata.com/control-plane: postgres-operator
name: postgres-operator
rules:
- apiGroups:
- ""
resources:
- configmaps
- persistentvolumeclaims
- secrets
- services
verbs:
- create
- delete
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
- endpoints
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
- endpoints/restricted
- pods/exec
verbs:
- create
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- delete
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- get
- list
- patch
- watch
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- watch
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- create
- delete
- get
- list
- patch
- watch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- postgresclusters
verbs:
- get
- list
- patch
- watch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- postgresclusters/finalizers
verbs:
- update
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- postgresclusters/status
verbs:
- patch
- apiGroups:
resources:
- rolebindings
- roles
verbs:
- create
- get
- list
- patch
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
postgres-operator.crunchydata.com/control-plane: postgres-operator
name: postgres-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: postgres-operator
subjects:
- kind: ServiceAccount
name: pgo
namespace: postgres-operator
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
postgres-operator.crunchydata.com/control-plane: postgres-operator
name: pgo
namespace: postgres-operator
spec:
replicas: 1
selector:
matchLabels:
postgres-operator.crunchydata.com/control-plane: postgres-operator
template:
metadata:
labels:
postgres-operator.crunchydata.com/control-plane: postgres-operator
spec:
containers:
- env:
- name: CRUNCHY_DEBUG
value: "true"
- name: RELATED_IMAGE_POSTGRES_13
value: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-ha:centos8-13.4-0
- name: RELATED_IMAGE_POSTGRES_13_GIS_3.1
value: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis-ha:centos8-13.4-3.1-0
- name: RELATED_IMAGE_PGBACKREST
value: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.33-2
- name: RELATED_IMAGE_PGBOUNCER
value: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-1.15-2
- name: RELATED_IMAGE_PGEXPORTER
value: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.0.2-0
image: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi8-5.0.2-0
name: operator
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
serviceAccountName: pgo
```apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: hippo
namespace: postgres-operator
spec:
backups:
pgbackrest:
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.33-2
repoHost:
dedicated: {}
repos:
- name: repo1
volume:
volumeClaimSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-ha:centos8-13.4-0
instances:
- dataVolumeClaimSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
name: instance1
postgresVersion: 13
```
--
You received this message because you are subscribed to a topic in the Google Groups "Postgres Operator" group.
To unsubscribe from this topic, visit https://groups.google.com/a/crunchydata.com/d/topic/postgres-operator/F4OdXSBP_Mg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to postgres-opera...@crunchydata.com.
Le 27 sept. 2021 à 21:43, Jean-Daniel <jdd...@xooloo.com> a écrit :kubectl get pod hippo-instance1-vnln-0 -o yaml
…volumes:- name: sshprojected:defaultMode: 32sources:- configMap:name: hippo-ssh-config- secret:name: hippo-ssh
- name: cert-volume
Le 27 sept. 2021 à 22:22, Andrew L'Ecuyer <andrew....@crunchydata.com> a écrit :Thanks for the additional info. Looking at the Pod specs you provided, it appears as though the proper fsGroup setting is missing from the securityContext.This could specifically be due to a false-positive with our OpenShift auto-detection logic, which controls the fsGroup setting.If you look at the logs of the "pgo" Deployment (e.g. kubectl logs pgo-7d4d585cc7-h4b9p), do you see the following information log towards the top?"detected OpenShift environment"
Also, can you try re-creating your PostgresCluster with the "openshift" setting explicitly set to "false", e.g.:spec:openshift: false