Skip to content

Commit

Permalink
Namespace change (#118)
Browse files Browse the repository at this point in the history
* Changes namespace to be configurable on release

* Deletes pv/pvc, adds configurable hostmount path

* Make sure hostMountPath exists, change it to be under /srv
  • Loading branch information
StrongestNumber9 authored Aug 15, 2023
1 parent e2df5f2 commit 14a9a00
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 37 deletions.
2 changes: 1 addition & 1 deletion k8s_01/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: config
namespace: {{.Values.namespace}}
namespace: {{.Release.Namespace}}
data:
config.json: |-
{{toJson .Values.config}}
Expand Down
7 changes: 4 additions & 3 deletions k8s_01/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kubelogreader
namespace: {{.Values.namespace}}
namespace: {{.Release.Namespace}}
labels:
app: k8s_01
host: kubelogreader
Expand All @@ -25,8 +25,9 @@ spec:
- configMap:
name: config
name: config
- persistentVolumeClaim:
claimName: statestore-pvc
- hostPath:
path: {{.Values.statestore.hostMountPath}}
type: DirectoryOrCreate
name: statestore
- hostPath:
path: /var/log/containers
Expand Down
15 changes: 0 additions & 15 deletions k8s_01/templates/pv.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions k8s_01/templates/pvc.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion k8s_01/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
namespace: {{.Values.namespace}}
namespace: {{.Release.Namespace}}
name: kubelogreader
rules:
- apiGroups:
Expand Down
4 changes: 2 additions & 2 deletions k8s_01/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kubelogreader
namespace: {{.Values.namespace}}
namespace: {{.Release.Namespace}}
subjects:
- kind: ServiceAccount
name: kubelogreader
namespace: {{.Values.namespace}}
namespace: {{.Release.Namespace}}
roleRef:
kind: ClusterRole
name: kubelogreader
Expand Down
1 change: 1 addition & 0 deletions k8s_01/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: metrics-service
namespace: {{.Release.Namespace}}
labels:
app: k8s_01
host: kubelogreader
Expand Down
2 changes: 1 addition & 1 deletion k8s_01/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: kubelogreader
namespace: {{.Values.namespace}}
namespace: {{.Release.Namespace}}
8 changes: 5 additions & 3 deletions k8s_01/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ config:
logging:
level: INFO

# Which namespace it will be installed to.
namespace: teragrep

# Keystore related
keystore:
# Which secret is passed to the container
secretName: keystore

# Statestore related
statestore:
# Where statestore is mounted on the host
hostMountPath: /srv/k8s_01/statestore

0 comments on commit 14a9a00

Please sign in to comment.