Support only deploy loki or promtail and fix helm lint issue

Signed-off-by: Xiang Dai <764524258@qq.com>
pull/398/head
Xiang Dai 6 years ago
parent b8d81ababa
commit 3fc4873b08
  1. 10
      production/helm/templates/loki/configmap.yaml
  2. 4
      production/helm/templates/loki/deployment.yaml
  3. 2
      production/helm/templates/loki/podsecuritypolicy.yaml
  4. 4
      production/helm/templates/loki/pvc.yaml
  5. 4
      production/helm/templates/loki/role.yaml
  6. 6
      production/helm/templates/loki/rolebinding.yaml
  7. 4
      production/helm/templates/loki/service.yaml
  8. 4
      production/helm/templates/loki/serviceaccount.yaml
  9. 4
      production/helm/templates/promtail/clusterrole.yaml
  10. 4
      production/helm/templates/promtail/clusterrolebinding.yaml
  11. 2
      production/helm/templates/promtail/configmap.yaml
  12. 2
      production/helm/templates/promtail/daemonset.yaml
  13. 4
      production/helm/templates/promtail/podsecuritypolicy.yaml
  14. 4
      production/helm/templates/promtail/role.yaml
  15. 6
      production/helm/templates/promtail/rolebinding.yaml
  16. 4
      production/helm/values.yaml

@ -1,3 +1,4 @@
{{- if .Values.loki.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
@ -35,13 +36,14 @@ data:
index:
prefix: {{ .index.prefix }}
period: {{ .index.period }}
{{- end -}}
{{- end -}}
{{- end }}
{{- end }}
{{- if .Values.loki.config.storage_configs }}
storage_config:
{{- range .Values.loki.config.storage_configs }}
{{ .name }}:
directory: {{ .directory }}
{{- end -}}
{{- end -}}
{{- end }}
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.loki.enabled }}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
@ -87,4 +88,5 @@ spec:
claimName: {{ .Values.loki.persistence.existingClaim | default (include "loki.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end -}}
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.loki.enabled }}
{{- if .Values.rbac.pspEnabled }}
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
@ -29,3 +30,4 @@ spec:
rule: 'RunAsAny'
readOnlyRootFilesystem: false
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.loki.enabled }}
{{- if and .Values.loki.persistence.enabled (not .Values.loki.persistence.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
@ -21,4 +22,5 @@ spec:
requests:
storage: {{ .Values.loki.persistence.size | quote }}
storageClassName: {{ .Values.loki.persistence.storageClassName }}
{{- end -}}
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.loki.enabled }}
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
@ -15,4 +16,5 @@ rules:
verbs: ['use']
resourceNames: [{{ template "loki.fullname" . }}]
{{- end }}
{{- end }}
{{- end }}
{{- end }}

@ -1,4 +1,5 @@
{{- if .Values.rbac.create -}}
{{- if .Values.loki.enabled }}
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
@ -15,4 +16,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ template "loki.serviceAccountName" . }}
{{- end -}}
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.loki.enabled }}
apiVersion: v1
kind: Service
metadata:
@ -22,4 +23,5 @@ spec:
targetPort: {{ .Values.loki.service.port }}
selector:
app: {{ template "loki.name" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.loki.enabled }}
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
@ -8,4 +9,5 @@ metadata:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "loki.serviceAccountName" . }}
{{- end }}
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.promtail.enabled }}
{{- if .Values.rbac.create }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
@ -21,4 +22,5 @@ rules:
- endpoints
- pods
verbs: ["get", "watch", "list"]
{{- end}}
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.promtail.enabled }}
{{- if .Values.rbac.create }}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
@ -20,4 +21,5 @@ roleRef:
kind: ClusterRole
name: {{ template "promtail.fullname" . }}-clusterrole
apiGroup: rbac.authorization.k8s.io
{{- end}}
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.promtail.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
@ -92,3 +93,4 @@ data:
- __meta_kubernetes_pod_uid
- __meta_kubernetes_pod_container_name
target_label: __path__
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.promtail.enabled }}
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
@ -95,3 +96,4 @@ spec:
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.promtail.enabled }}
{{- if .Values.rbac.pspEnabled }}
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
@ -27,4 +28,5 @@ spec:
fsGroup:
rule: 'RunAsAny'
readOnlyRootFilesystem: false
{{- end }}
{{- end }}
{{- end }}

@ -1,3 +1,4 @@
{{- if .Values.promtail.enabled }}
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
@ -15,4 +16,5 @@ rules:
verbs: ['use']
resourceNames: [{{ template "promtail.fullname" . }}]
{{- end }}
{{- end }}
{{- end }}
{{- end }}

@ -1,4 +1,5 @@
{{- if .Values.rbac.create -}}
{{- if .Values.promtail.enabled }}
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
@ -15,4 +16,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ template "promtail.serviceAccountName" . }}
{{- end -}}
{{- end }}
{{- end }}

@ -7,6 +7,8 @@ serviceAccount:
name:
loki:
enabled: true
replicas: 1
deploymentStrategy: RollingUpdate
@ -94,6 +96,8 @@ loki:
directory: /data/loki/chunks
promtail:
enabled: true
nameOverride: promtail
deploymentStrategy: RollingUpdate

Loading…
Cancel
Save