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

Kubernetes: Ingress extensions/v1beta1 -> networking.k8s.io/v1beta1 #368

Closed
wants to merge 1 commit into from
Closed

Kubernetes: Ingress extensions/v1beta1 -> networking.k8s.io/v1beta1 #368

wants to merge 1 commit into from

Conversation

SoftCreatR
Copy link

ISSUE TYPE
  • Bug fix Pull Request
SUMMARY

Resource Ingress is deprecated in Kubernetes API extensions/v1beta1

https://github.com/infracloudio/botkube/blob/c6db9526a3232b210fd05202d104ca18eb3a03c2/helm/botkube/templates/ingress.yaml#L2-L3

Referencing PR: kubernetes/kubernetes#74057

POSSIBLE FIX

apiVersion: networking.k8s.io/v1beta1
kind: Ingress

@PrasadG193
Copy link
Collaborator

Looks good.
@SoftCreatR could you please post the output of helm install with --dry-run --debug flags?

@SoftCreatR
Copy link
Author

Looks good.
@SoftCreatR could you please post the output of helm install with --dry-run --debug flags?

Will do that later this day, if no one is faster 😎

Copy link

@rahulchheda rahulchheda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@bhavin192
Copy link
Contributor

bhavin192 commented Oct 1, 2020

Hey @SoftCreatR did you try updating by installing the old chart (let's say from current develop), then running helm upgrade with your changes applied?

@SoftCreatR
Copy link
Author

Hey @SoftCreatR did you try updating by installing the old chart (let's say from current develop), then running helm upgrade with your changes applied?

Didn't had the time, yet.

@rahulchheda
Copy link

@SoftCreatR Any update on this PR, yet?

@SoftCreatR
Copy link
Author

Sorry for the late reply. There you go:

helm install -dry-run --verbose --version v0.11.0 botkube --create-namespace --namespace="botkube" \
  --set communications.slack.enabled=true \
  --set communications.slack.channel=botkube-test \
  --set communications.slack.token=xoxb-0000000000000-0000000000000-XXXXXXXXXXXXXXXXXXXXXXXX \
  --set config.settings.kubectl.enabled=true \
  --set image.repository=infracloudio/botkube \
  --set image.tag=v0.11.0 \
  infracloudio/botkube

=>

NAME: botkube
LAST DEPLOYED: Mon Oct  5 06:38:35 2020
NAMESPACE: botkube
STATUS: pending-install
REVISION: 1
TEST SUITE: None
USER-SUPPLIED VALUES:
communications:
  slack:
    channel: botkube-test
    enabled: true
    token: xoxb-0000000000000-0000000000000-XXXXXXXXXXXXXXXXXXXXXXXX
config:
  settings:
    kubectl:
      enabled: true
image:
  repository: infracloudio/botkube
  tag: v0.11.0

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: botkube-test
    enabled: true
    notiftype: short
    token: xoxb-0000000000000-0000000000000-XXXXXXXXXXXXXXXXXXXXXXXX
  teams:
    appID: APPLICATION_ID
    appPassword: APPLICATION_PASSWORD
    enabled: false
    notiftype: short
    port: 3978
  webhook:
    enabled: false
    url: WEBHOOK_URL
config:
  recommendations: true
  resources:
  - events:
    - create
    - delete
    - error
    name: v1/pods
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: v1/services
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - update
    - delete
    - error
    name: apps/v1/deployments
    namespaces:
      ignore:
      - null
      include:
      - all
    updateSetting:
      fields:
      - spec.template.spec.containers[*].image
      - status.availableReplicas
      includeDiff: true
  - events:
    - create
    - update
    - delete
    - error
    name: apps/v1/statefulsets
    namespaces:
      ignore:
      - null
      include:
      - all
    updateSetting:
      fields:
      - spec.template.spec.containers[*].image
      - status.readyReplicas
      includeDiff: true
  - events:
    - create
    - delete
    - error
    name: networking.k8s.io/v1beta1/ingresses
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: v1/nodes
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: v1/namespaces
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: v1/persistentvolumes
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: v1/persistentvolumeclaims
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: v1/configmaps
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - update
    - delete
    - error
    name: apps/v1/daemonsets
    namespaces:
      ignore:
      - null
      include:
      - all
    updateSetting:
      fields:
      - spec.template.spec.containers[*].image
      - status.numberReady
      includeDiff: true
  - events:
    - create
    - update
    - delete
    - error
    name: batch/v1/jobs
    namespaces:
      ignore:
      - null
      include:
      - all
    updateSetting:
      fields:
      - spec.template.spec.containers[*].image
      - status.conditions[*].type
      includeDiff: true
  - events:
    - create
    - delete
    - error
    name: rbac.authorization.k8s.io/v1/roles
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: rbac.authorization.k8s.io/v1/rolebindings
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: rbac.authorization.k8s.io/v1/clusterrolebindings
    namespaces:
      ignore:
      - null
      include:
      - all
  - events:
    - create
    - delete
    - error
    name: rbac.authorization.k8s.io/v1/clusterroles
    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: true
      restrictAccess: false
    upgradeNotifier: true
  ssl:
    enabled: false
extraAnnotations: {}
extraEnv: null
fullnameOverride: ""
image:
  pullPolicy: IfNotPresent
  repository: infracloudio/botkube
  tag: v0.11.0
ingress:
  annotations:
    kubernetes.io/ingress.class: nginx
  create: false
  host: HOST
  tls:
    enabled: false
    secretName: ""
  urlPath: /
logLevel: info
nameOverride: ""
nodeSelector: {}
podSecurityPolicy:
  enabled: false
priorityClassName: ""
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.11.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.11.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: botkube-test
        enabled: true
        notiftype: short
        token: xoxb-0000000000000-0000000000000-XXXXXXXXXXXXXXXXXXXXXXXX
      teams:
        appID: APPLICATION_ID
        appPassword: APPLICATION_PASSWORD
        enabled: false
        notiftype: short
        port: 3978
      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.11.0
    app.kubernetes.io/instance: botkube
    app.kubernetes.io/managed-by: Helm
data:
  resource_config.yaml: |
    recommendations: true
    resources:
    - events:
      - create
      - delete
      - error
      name: v1/pods
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: v1/services
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - update
      - delete
      - error
      name: apps/v1/deployments
      namespaces:
        ignore:
        - null
        include:
        - all
      updateSetting:
        fields:
        - spec.template.spec.containers[*].image
        - status.availableReplicas
        includeDiff: true
    - events:
      - create
      - update
      - delete
      - error
      name: apps/v1/statefulsets
      namespaces:
        ignore:
        - null
        include:
        - all
      updateSetting:
        fields:
        - spec.template.spec.containers[*].image
        - status.readyReplicas
        includeDiff: true
    - events:
      - create
      - delete
      - error
      name: networking.k8s.io/v1beta1/ingresses
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: v1/nodes
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: v1/namespaces
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: v1/persistentvolumes
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: v1/persistentvolumeclaims
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: v1/configmaps
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - update
      - delete
      - error
      name: apps/v1/daemonsets
      namespaces:
        ignore:
        - null
        include:
        - all
      updateSetting:
        fields:
        - spec.template.spec.containers[*].image
        - status.numberReady
        includeDiff: true
    - events:
      - create
      - update
      - delete
      - error
      name: batch/v1/jobs
      namespaces:
        ignore:
        - null
        include:
        - all
      updateSetting:
        fields:
        - spec.template.spec.containers[*].image
        - status.conditions[*].type
        includeDiff: true
    - events:
      - create
      - delete
      - error
      name: rbac.authorization.k8s.io/v1/roles
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: rbac.authorization.k8s.io/v1/rolebindings
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: rbac.authorization.k8s.io/v1/clusterrolebindings
      namespaces:
        ignore:
        - null
        include:
        - all
    - events:
      - create
      - delete
      - error
      name: rbac.authorization.k8s.io/v1/clusterroles
      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: true
        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.11.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.11.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: 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.11.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: 7196d56dddecb9c1a41750e0fa3ec471cdc22eaa3fcc18b3b9e181e021b0ddef
    spec:
      serviceAccountName: botkube-sa
      containers:
        - name: botkube
          image: "infracloudio/botkube:v0.11.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.11.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

=>

image

@PrasadG193
Copy link
Collaborator

Thanks @SoftCreatR,
Unfortunately, ingress resource is not created by default. Could you please provide the dry-run output with the following flags set

  --set ingress.create=true \
  --set ingress.host=<HOST> \
  --set ingress.urlPath=<URLPATH> \
  --set ingress.tls.enabled=true \
  --set ingress.tls.secretName=<TLS_SECRET_NAME> \

@SoftCreatR
Copy link
Author

@PrasadG193 I do currently not have an environment to test it with ingress.

@PrasadG193
Copy link
Collaborator

@SoftCreatR It's fine! You don't need that for --dry-run. Adding --dry-run --debug flags won't create any resources. Just dry-run output would suffice for validation

@SoftCreatR
Copy link
Author

I know, but I currently don't have any Cluster available with ingress set up ;)

@PrasadG193
Copy link
Collaborator

It should work! Can you try helm install command with the options I suggested set and additional --dry-run --debug flags

@SoftCreatR SoftCreatR closed this Oct 18, 2020
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.

4 participants