vmware-archive / wavefront-adapter-for-istio

Wavefront by VMware Adapter for Istio is an adapter for Istio to publish metrics to Wavefront by VMware.
Other
14 stars 17 forks source link

Update helm to update API's used for Deployments and Sevices to apps/v1 #92

Open akodali18 opened 4 years ago

akodali18 commented 4 years ago

Describe the bug helm chart to installation will fail on kubernetes version 1.16 and above

With 1.16 version of kubernetes, Deployment in the extensions/v1beta1, apps/v1beta1, and apps/v1beta2 API versions is no longer served.

In the new api i.e. apps/v1, for Deployment - spec.selector is now required and immutable after creation; use the existing template labels as the selector for seamless upgrades Refer to https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/

We Need to modify out helm charts to include spec.selector in Deployment, specifically modify it to something like :

---
# Source: wavefront/templates/adapter.yaml
# deployment for adapter wavefront
apiVersion: apps/v1
kind: Deployment
metadata:
  name: wavefront
  namespace: wavefront-istio
  labels:
    app: wavefront
spec:
  replicas: 1
  selector:
    matchLabels:
      app: wavefront
  template:
    metadata:
      labels:
        app: wavefront
      annotations:
        sidecar.istio.io/inject: "false"
        scheduler.alpha.kubernetes.io/critical-pod: ""
    spec:
      containers:
      - name: wavefront
        image: vmware/wavefront-adapter-for-istio:0.1.2
        imagePullPolicy: Always
        ports:
        - containerPort: 8000
--- 

Steps to reproduce the bug {{ Minimal steps to reproduce the behavior }} Just use existing helm chart to install the adapter on K8s version 1.16 and above.

Version {{ What version of Istio and Kubernetes are you using? Use istioctl version and kubectl version }} This can be seen using any kubernetes version 1.16 and above.