Skip to content

Commit

Permalink
Merge pull request #15 from 7knot/feat/update-chart-to-add-new-features
Browse files Browse the repository at this point in the history
feat(panope): update chart to add new features
  • Loading branch information
mugioka authored Mar 4, 2022
2 parents c6c7386 + 6e1a607 commit e640418
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/panope/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.7
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.2.2"
appVersion: "v0.3.0"
2 changes: 2 additions & 0 deletions charts/panope/templates/agent/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ data:
AGENT_SUBJECT: {{ required "Invalid value. Values.agent.configMap.agentSubject is required!" .Values.agent.configMap.agentSubject | quote }}
CONTROLLER_SUBJECT: {{ required "Invalid value. Values.agent.configMap.controllerSubject is required!" .Values.agent.configMap.controllerSubject | quote }}
NATS_URI: {{ required "Invalid value. Values.agent.configMap.natsUri is required!" .Values.agent.configMap.natsUri | quote }}
CLUSTER_NODE_MAX_SURGE: {{ .Values.agent.configMap.clusterNodeMaxSurge | quote }}
MAX_PROCESSED_NODE_COUNT: {{ .Values.agent.configMap.maxProcessedNodeCount | quote }}
HEALTH_CHECK_PORT: {{ .Values.agent.configMap.healthCheckPort | quote }}
METRICS_PORT: {{ .Values.agent.configMap.metricsPort | quote }}
3 changes: 3 additions & 0 deletions charts/panope/templates/agent/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
serviceAccountName: {{ include "panope.agent.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.agent.podSecurityContext | nindent 8 }}
{{- if .Values.agent.priorityClassName }}
priorityClassName: {{ .Values.agent.priorityClassName }}
{{- end }}
containers:
- name: {{ .Release.Name }}
command:
Expand Down
27 changes: 27 additions & 0 deletions charts/panope/templates/agent/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "panope.agent.fullname" . }}
labels:
{{- include "panope.agent.labels" . | nindent 4 }}
{{- with .Values.agent.role.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.agent.role.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- create
- apiGroups:
- ""
resources:
- pods
verbs:
- get
21 changes: 21 additions & 0 deletions charts/panope/templates/agent/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "panope.agent.fullname" . }}
labels:
{{- include "panope.agent.labels" . | nindent 4 }}
{{- with .Values.agent.roleBinding.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.agent.roleBinding.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "panope.agent.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "panope.agent.fullname" . }}
namespace: {{ .Release.Namespace }}
7 changes: 7 additions & 0 deletions charts/panope/templates/observer/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
serviceAccountName: {{ include "panope.observer.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.observer.podSecurityContext | nindent 8 }}
{{- if .Values.observer.priorityClassName }}
priorityClassName: {{ .Values.observer.priorityClassName }}
{{- end }}
containers:
- image: "{{ .Values.observer.image.repository }}:{{ .Values.observer.image.tag | default .Chart.AppVersion }}"
command:
Expand Down Expand Up @@ -68,3 +71,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "panope.observer.fullname" . }}-env
{{- with .Values.observer.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
22 changes: 22 additions & 0 deletions charts/panope/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ agent:
# runAsNonRoot: true
# runAsUser: 1000

priorityClassName: ""

resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down Expand Up @@ -119,6 +121,10 @@ agent:
controllerSubject:
healthCheckPort: "4444"
metricsPort: "2112"
# configure the maximum number of nodes in the cluster as a percentage
clusterNodeMaxSurge: "25%"
# configure the maximum number of nodes to be processed at the same time (cordoned or drained, etc.)
maxProcessedNodeCount: "5"

serviceAccount:
name: ""
Expand All @@ -127,6 +133,18 @@ agent:
# Annotations to add to the service account
annotations: {}

role:
# labels to add to the role
labels: {}
# Annotations to add to the role
annotations: {}

roleBinding:
# labels to add to the role binding
labels: {}
# Annotations to add to the role binding
annotations: {}

clusterRole:
# labels to add to the cluster role
labels: {}
Expand Down Expand Up @@ -235,6 +253,8 @@ observer:
# Annotations to add to the cluster role binding
annotations: {}

priorityClassName: ""

resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand All @@ -248,6 +268,8 @@ observer:
# cpu: 100m
# memory: 128Mi

tolerations: []

serviceMonitor:
# labels to add to the servicemonitor
labels: {}
Expand Down

0 comments on commit e640418

Please sign in to comment.