potentially a noob question: I am interested in re...
# all-things-deployment
b
potentially a noob question: I am interested in retaining the logs for GMS, however, as gms and frontend are Deployments, they dont scale up with RW Once PVs (I don't have access to ReadWriteMany PVs) hence my thoughts are that I will use podAffinity to colocate all the GMS pods (I wanted at least 2 instances) so that they can use the same RWO PV, my values.yaml for gms looks like:
Copy code
datahub-gms:
  enabled: true
  image:
    repository: linkedin/datahub-gms
    tag: "v0.8.44"
  service:
    type: ClusterIP
  replicaCount: 2
  extraVolumes:
    - name: gms-backup
      persistentVolumeClaim:
        claimName: temp2
  extraVolumeMounts:
    - name: gms-backup
      mountPath: /tmp/datahub/logs/gms      
      readOnly: false
  affinity:
    podAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: <http://app.kubernetes.io/name|app.kubernetes.io/name>
            operator: In
            values:
            - datahub-gms
        topologyKey: <http://kubernetes.io/hostname|kubernetes.io/hostname>
however, when i kubectl exec into gms, I see that /tmp/datahub/logs/gms has lost+found instead of the logs. any ideas why? I'm using GKE here
1
nvm, seems like i need to set podSecurityContext
Copy code
datahub-gms:
  enabled: true
  image:
    repository: linkedin/datahub-gms
    tag: "v0.8.44"
  service:
    type: ClusterIP
  replicaCount: 2
  extraVolumes:
  - name: gmsbackup
    persistentVolumeClaim:
      claimName: temp2
  extraVolumeMounts:
  - name: gmsbackup
    mountPath: /tmp/datahub/     
  affinity:
    podAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: <http://app.kubernetes.io/name|app.kubernetes.io/name>
            operator: In
            values:
            - datahub-gms
        topologyKey: <http://kubernetes.io/hostname|kubernetes.io/hostname>
  podSecurityContext:
    fsGroup: 2000