-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing resources to the deployment.yaml #330
Conversation
Thanks for the PR @qlikcoe. Could you please also add default resource request/limits to values.yaml
should work. |
Also please attach output of |
@PrasadG193 As far as I know, the best practice is not to define any resources in chart's default values. |
I don't think so, you can check community helm charts from the stable repo. There you can find default request/limits set on most of the helm chatts e.g https://github.com/helm/charts/blob/master/stable/postgresql/values.yaml#L400 |
https://jfrog.com/blog/helm-charts-best-practices/
|
Anyways, I'll add the resources to the chart if you prefer to rather have it 👍 |
@PrasadG193 FWIW, I'd prefer not have default resources defined in any helm charts I use, since I like to be able to use charts in resource-constrained environments like Docker Desktop/MiniKube on my laptop. |
@qlikcoe @hairyhenderson that makes sense. Let's not include the default values then |
NAME: botkube
REVISION: 1
RELEASED: Fri Sep 4 12:18:17 2020
CHART: botkube-v0.10.0
USER-SUPPLIED VALUES:
{}
COMPUTED VALUES:
affinity: {}
communications:
elasticsearch:
enabled: false
index:
name: botkube
replicas: 0
shards: 1
type: botkube-event
password: ELASTICSEARCH_PASSWORD
server: ELASTICSEARCH_ADDRESS
username: ELASTICSEARCH_USERNAME
mattermost:
channel: MATTERMOST_CHANNEL
enabled: false
notiftype: short
team: MATTERMOST_TEAM
token: MATTERMOST_TOKEN
url: MATTERMOST_SERVER_URL
slack:
channel: SLACK_CHANNEL
enabled: false
notiftype: short
token: SLACK_API_TOKEN
webhook:
enabled: false
url: WEBHOOK_URL
config:
recommendations: true
resources:
- events:
- create
- delete
- error
name: pod
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: service
namespaces:
ignore:
- null
include:
- all
- events:
- create
- update
- delete
- error
name: deployment
namespaces:
ignore:
- null
include:
- all
updateSetting:
fields:
- spec.template.spec.containers[*].image
- status.availableReplicas
includeDiff: true
- events:
- create
- update
- delete
- error
name: statefulset
namespaces:
ignore:
- null
include:
- all
updateSetting:
fields:
- spec.template.spec.containers[*].image
- status.readyReplicas
includeDiff: true
- events:
- create
- delete
- error
name: ingress
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: node
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: namespace
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: persistentvolume
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: persistentvolumeclaim
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: configmap
namespaces:
ignore:
- null
include:
- all
- events:
- create
- update
- delete
- error
name: daemonset
namespaces:
ignore:
- null
include:
- all
updateSetting:
fields:
- spec.template.spec.containers[*].image
- status.numberReady
includeDiff: true
- events:
- create
- update
- delete
- error
name: job
namespaces:
ignore:
- null
include:
- all
updateSetting:
fields:
- spec.template.spec.containers[*].image
- status.conditions[*].type
includeDiff: true
- events:
- create
- delete
- error
name: role
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: rolebinding
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: clusterrole
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: clusterrolebinding
namespaces:
ignore:
- null
include:
- all
settings:
allowkubectl: false
clustername: not-configured
configwatcher: true
restrictAccess: false
upgradeNotifier: true
ssl:
enabled: false
extraEnv: null
fullnameOverride: ""
image:
pullPolicy: IfNotPresent
repository: infracloudio/botkube
tag: v0.10.0
logLevel: info
nameOverride: ""
nodeSelector: {}
podSecurityPolicy:
enabled: false
rbac:
create: true
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- get
- watch
- list
replicaCount: 1
resources: {}
securityContext:
runAsGroup: 101
runAsUser: 101
service:
name: metrics
port: 2112
targetPort: 2112
serviceAccount:
create: true
serviceMonitor:
enabled: false
interval: 10s
labels: {}
path: /metrics
port: metrics
tolerations: []
HOOKS:
MANIFEST:
---
# Source: botkube/templates/communicationsecret.yaml
apiVersion: v1
kind: Secret
metadata:
name: botkube-communication-secret
labels:
app.kubernetes.io/name: botkube
helm.sh/chart: botkube-v0.10.0
app.kubernetes.io/instance: botkube
app.kubernetes.io/managed-by: Tiller
stringData:
comm_config.yaml: |
# Communication settings
communications:
elasticsearch:
enabled: false
index:
name: botkube
replicas: 0
shards: 1
type: botkube-event
password: ELASTICSEARCH_PASSWORD
server: ELASTICSEARCH_ADDRESS
username: ELASTICSEARCH_USERNAME
mattermost:
channel: MATTERMOST_CHANNEL
enabled: false
notiftype: short
team: MATTERMOST_TEAM
token: MATTERMOST_TOKEN
url: MATTERMOST_SERVER_URL
slack:
channel: SLACK_CHANNEL
enabled: false
notiftype: short
token: SLACK_API_TOKEN
webhook:
enabled: false
url: WEBHOOK_URL
---
# Source: botkube/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: botkube-configmap
labels:
app.kubernetes.io/name: botkube
helm.sh/chart: botkube-v0.10.0
app.kubernetes.io/instance: botkube
app.kubernetes.io/managed-by: Tiller
data:
resource_config.yaml: |
recommendations: true
resources:
- events:
- create
- delete
- error
name: pod
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: service
namespaces:
ignore:
- null
include:
- all
- events:
- create
- update
- delete
- error
name: deployment
namespaces:
ignore:
- null
include:
- all
updateSetting:
fields:
- spec.template.spec.containers[*].image
- status.availableReplicas
includeDiff: true
- events:
- create
- update
- delete
- error
name: statefulset
namespaces:
ignore:
- null
include:
- all
updateSetting:
fields:
- spec.template.spec.containers[*].image
- status.readyReplicas
includeDiff: true
- events:
- create
- delete
- error
name: ingress
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: node
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: namespace
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: persistentvolume
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: persistentvolumeclaim
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: configmap
namespaces:
ignore:
- null
include:
- all
- events:
- create
- update
- delete
- error
name: daemonset
namespaces:
ignore:
- null
include:
- all
updateSetting:
fields:
- spec.template.spec.containers[*].image
- status.numberReady
includeDiff: true
- events:
- create
- update
- delete
- error
name: job
namespaces:
ignore:
- null
include:
- all
updateSetting:
fields:
- spec.template.spec.containers[*].image
- status.conditions[*].type
includeDiff: true
- events:
- create
- delete
- error
name: role
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: rolebinding
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: clusterrole
namespaces:
ignore:
- null
include:
- all
- events:
- create
- delete
- error
name: clusterrolebinding
namespaces:
ignore:
- null
include:
- all
settings:
allowkubectl: false
clustername: not-configured
configwatcher: true
restrictAccess: false
upgradeNotifier: true
ssl:
enabled: false
---
# Source: botkube/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: botkube-sa
labels:
app.kubernetes.io/name: botkube
helm.sh/chart: botkube-v0.10.0
app.kubernetes.io/instance: botkube
app.kubernetes.io/managed-by: Tiller
---
# Source: botkube/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: botkube-clusterrole
labels:
app.kubernetes.io/name: botkube
helm.sh/chart: botkube-v0.10.0
app.kubernetes.io/instance: botkube
app.kubernetes.io/managed-by: Tiller
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- get
- watch
- list
---
# Source: botkube/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: botkube-clusterrolebinding
labels:
app.kubernetes.io/name: botkube
helm.sh/chart: botkube-v0.10.0
app.kubernetes.io/instance: botkube
app.kubernetes.io/managed-by: Tiller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: botkube-clusterrole
subjects:
- kind: ServiceAccount
name: botkube-sa
namespace: botkube
---
# Source: botkube/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: botkube
labels:
app.kubernetes.io/name: botkube
helm.sh/chart: botkube-v0.10.0
app.kubernetes.io/instance: botkube
app.kubernetes.io/managed-by: Tiller
component: controller
app: botkube
spec:
replicas: 1
selector:
matchLabels:
component: controller
app: botkube
template:
metadata:
labels:
component: controller
app: botkube
annotations:
checksum/config: 4dc53f58d02a580adf5d096d24dde05fad921e8fb1bc7263e5b4993f9877c420
spec:
serviceAccountName: botkube-sa
containers:
- name: botkube
image: "infracloudio/botkube:v0.10.0"
imagePullPolicy: IfNotPresent
volumeMounts:
- name: config-volume
mountPath: "/config"
env:
- name: CONFIG_PATH
value: "/config/"
- name: LOG_LEVEL
value: "info"
- name: BOTKUBE_VERSION
value: v0.10.0
- name: METRICS_PORT
value: "2112"
volumes:
- name: config-volume
projected:
sources:
- configMap:
name: botkube-configmap
- secret:
name: botkube-communication-secret
securityContext:
runAsUser: 101
runAsGroup: 101
|
@qlikcoe Could you please post the output of helm install dry run with resource limits set with |
|
@qlikcoe I am suspecting indentation issue
Did you test this by doing actual deployment? |
@PrasadG193 You're right. One sec. |
New deployment manifest
|
@PrasadG193 I just realized that the chart version should be bumped, probably... |
ISSUE TYPE
SUMMARY
Adds missing
resources
section to the deployment manifest.Fixes #313