Skip to content
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

Merged
merged 3 commits into from
Sep 4, 2020

Conversation

qlikcoe
Copy link
Contributor

@qlikcoe qlikcoe commented Sep 3, 2020

ISSUE TYPE
  • Bug fix Pull Request
SUMMARY

Adds missing resources section to the deployment manifest.
Fixes #313

@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

@PrasadG193 🙏

@PrasadG193
Copy link
Collaborator

Thanks for the PR @qlikcoe. Could you please also add default resource request/limits to values.yaml

cpu: 100m, mem: 200Mi

should work.

@PrasadG193
Copy link
Collaborator

Also please attach output of helm install botkube ./helm/botkube --namespace botkube --dry-run --debug just to make sure everything is rendering correctly

@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

@PrasadG193 As far as I know, the best practice is not to define any resources in chart's default values.
🤷

@PrasadG193
Copy link
Collaborator

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

@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

https://jfrog.com/blog/helm-charts-best-practices/

 # We usually recommend not to specify default resources and to leave this as a conscious
 # choice for the user. This also increases chances charts run on environments with little
 # resources, such as Minikube. If you do want to specify resources, uncomment the following
 # lines, adjust them as necessary, and remove the curly braces after 'resources:'.

@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

Anyways, I'll add the resources to the chart if you prefer to rather have it 👍

@hairyhenderson
Copy link

@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.

@PrasadG193
Copy link
Collaborator

@qlikcoe @hairyhenderson that makes sense. Let's not include the default values then

@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

Also please attach output of helm install botkube ./helm/botkube --namespace botkube --dry-run --debug just to make sure everything is rendering correctly

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

@PrasadG193
Copy link
Collaborator

@qlikcoe Could you please post the output of helm install dry run with resource limits set with --set?

@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

@PrasadG193

helm install --name botkube ./helm/botkube --namespace botkube --dry-run --debug --set resources.limits.cpu=200m --set resources.limits.memory=256Mi --set resources.requests.cpu=100m --set resources.requests.memory=128Mi

[debug] Created tunnel using local port: '56264'

[debug] SERVER: "127.0.0.1:56264"

[debug] Original chart version: ""
[debug] CHART PATH: /Users/***/Projects/botkube/helm/botkube

NAME:   botkube
REVISION: 1
RELEASED: Fri Sep  4 12:24:35 2020
CHART: botkube-v0.10.0
USER-SUPPLIED VALUES:
resources:
  limits:
    cpu: 200m
    memory: 256Mi
  requests:
    cpu: 100m
    memory: 128Mi

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:
  limits:
    cpu: 200m
    memory: 256Mi
  requests:
    cpu: 100m
    memory: 128Mi
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"
          resources:
              limits:
                cpu: 200m
                memory: 256Mi
              requests:
                cpu: 100m
                memory: 128Mi

      volumes:
        - name: config-volume
          projected:
            sources:
            - configMap:
                name: botkube-configmap
            - secret:
                name: botkube-communication-secret
      securityContext:
        runAsUser: 101
        runAsGroup: 101

@PrasadG193
Copy link
Collaborator

@qlikcoe I am suspecting indentation issue

          resources:
              limits:
                cpu: 200m
                memory: 256Mi
              requests:
                cpu: 100m
                memory: 128Mi

Did you test this by doing actual deployment?

@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

@PrasadG193 You're right. One sec.

@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

New deployment manifest
helm install --name botkube ./helm/botkube --namespace botkube --dry-run --debug --set resources.limits.cpu=200m --set resources.limits.memory=256Mi --set resources.requests.cpu=100m --set resources.requests.memory=128Mi

---
# 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: 4d39302d428f5c0f5a8008696f835997f41310d8c1df7d5ce07c2fef8de55e0c
    spec:
      serviceAccountName: botkube-sa
      containers:
        - name: botkube
          image: "infracloudio/botkube:latest"
          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"
          resources:
            limits:
              cpu: 200m
              memory: 256Mi
            requests:
              cpu: 100m
              memory: 128Mi

      volumes:
        - name: config-volume
          projected:
            sources:
            - configMap:
                name: botkube-configmap
            - secret:
                name: botkube-communication-secret
      securityContext:
        runAsUser: 101
        runAsGroup: 101

@mergify mergify bot merged commit d33bd0c into kubeshop:develop Sep 4, 2020
@qlikcoe qlikcoe deleted the issue-313-resources branch September 4, 2020 17:50
@qlikcoe
Copy link
Contributor Author

qlikcoe commented Sep 4, 2020

@PrasadG193 I just realized that the chart version should be bumped, probably...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] configuration of resources requests and limits is not used
3 participants