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

Priority class support for helm deployment #308

Merged
merged 3 commits into from
Jul 6, 2020

Conversation

kartik-moolya
Copy link
Contributor

ISSUE TYPE
  • Feature Pull Request
SUMMARY

Priority class support for helm deployment

@PrasadG193
Copy link
Collaborator

@kartik-moolya Please provide dry run output with the priorityClassName flag set

@kartik-moolya
Copy link
Contributor Author

helm install botkube helm/botkube/ --set priorityClassName="test-class" --debug --dry-run
install.go:159: [debug] Original chart version: ""
install.go:176: [debug] CHART PATH: /home/user/infracloud/botkube/helm/botkube

NAME: botkube
LAST DEPLOYED: Fri Jul  3 23:17:04 2020
NAMESPACE: default
STATUS: pending-install
REVISION: 1
TEST SUITE: None
USER-SUPPLIED VALUES:
priorityClassName: test-class

COMPUTED VALUES:
affinity: {}
communications:
  elasticsearch:
    awsSigning:
      awsRegion: us-east-1
      enabled: false
      roleArn: ""
    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:
    clustername: not-configured
    configwatcher: true
    kubectl:
      commands:
        resources:
        - deployments
        - pods
        - namespaces
        - daemonsets
        - statefulsets
        - storageclasses
        - nodes
        verbs:
        - api-resources
        - api-versions
        - cluster-info
        - describe
        - diff
        - explain
        - get
        - logs
        - top
        - auth
      defaultNamespace: default
      enabled: false
      restrictAccess: false
    upgradeNotifier: true
  ssl:
    enabled: false
extraAnnotations: {}
extraEnv: null
fullnameOverride: ""
image:
  pullPolicy: IfNotPresent
  repository: infracloudio/botkube
  tag: latest
logLevel: info
nameOverride: ""
nodeSelector: {}
podSecurityPolicy:
  enabled: false
priorityClassName: test-class
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:
  annotations: {}
  create: true
serviceMonitor:
  enabled: false
  interval: 10s
  labels: {}
  path: /metrics
  port: metrics
tolerations: []

HOOKS:
MANIFEST:
---
# 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: Helm
---
# 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: Helm
stringData:
  comm_config.yaml: |
    # Communication settings
    communications:
      elasticsearch:
        awsSigning:
          awsRegion: us-east-1
          enabled: false
          roleArn: ""
        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: Helm
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:
      clustername: not-configured
      configwatcher: true
      kubectl:
        commands:
          resources:
          - deployments
          - pods
          - namespaces
          - daemonsets
          - statefulsets
          - storageclasses
          - nodes
          verbs:
          - api-resources
          - api-versions
          - cluster-info
          - describe
          - diff
          - explain
          - get
          - logs
          - top
          - auth
        defaultNamespace: default
        enabled: false
        restrictAccess: false
      upgradeNotifier: true
    ssl:
      enabled: false
---
# 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: Helm
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: Helm
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: botkube-clusterrole
subjects:
- kind: ServiceAccount
  name: botkube-sa
  namespace: default
---
# 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: Helm
    component: controller
    app: botkube
spec:
  replicas: 1
  selector:
    matchLabels:
      component: controller
      app: botkube
  template:
    metadata:
      labels:
        component: controller
        app: botkube
      annotations:
        checksum/config: 2058cb74fc59eff8638807755e21acca6bf836e63087fb192dccbe1fee90b440
    spec:
      priorityClassName: "test-class"
      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"            
      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 7b28f66 into develop Jul 6, 2020
@PrasadG193 PrasadG193 deleted the feature/aws-kiam-support branch July 11, 2020 11:27
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.

2 participants