forked from HariSekhon/Kubernetes-configs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit-container-fix.patch.yaml
More file actions
42 lines (40 loc) · 1.22 KB
/
init-container-fix.patch.yaml
File metadata and controls
42 lines (40 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# Author: Hari Sekhon
# Date: 2021-02-25 14:53:44 +0000 (Thu, 25 Feb 2021)
#
# vim:ts=2:sts=2:sw=2:et
# lint: k8s
#
# https://github.com/HariSekhon/Kubernetes-configs
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# Quick initContainers fix patch that can be applied via Kustomize to any matching Deployment / StatefulSet
# just by adding this filename to kustomize.yaml's patchesStrategicMerge section
---
apiVersion: apps/v1
kind: Deployment
#kind: StatefulSet
metadata:
# XXX: Edit
name: NAME
namespace: NAMESPACE
spec:
template:
spec:
#securityContext:
#runAsUser: 0 # not recommended
#fsGroup: 1000 # group to own volumeMounts so they can be written to by the user-level process
initContainers:
- name: chown
image: busybox
# XXX: Edit <id>:<gid> and /path
command: ['sh', '-c', 'chown -R 8983:8983 /var/solr']
volumeMounts:
# XXX: Edit to match containers
- name: var-solr
mountPath: /var/solr/