Skip to content

2 examples are incompatible with k8s v1.16. #3160

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

Closed
oke-py opened this issue Nov 4, 2019 · 2 comments · Fixed by #3161
Closed

2 examples are incompatible with k8s v1.16. #3160

oke-py opened this issue Nov 4, 2019 · 2 comments · Fixed by #3161
Assignees
Labels
kind/bug Something isn't working meta/examples

Comments

@oke-py
Copy link
Contributor

oke-py commented Nov 4, 2019

Expected behavior

Examples are successfully deployed to k8s v1.16 cluster.

  • helm-deployment
  • helm-deployment-dependencies

Actual behavior

skaffold dev exits with an error.

$ cd ~/go/src/github.com/GoogleContainerTools/skaffold/examples/helm-deployment
$ skaffold dev
Listing files to watch...
 - gcr.io/decent-space-249411/skaffold-helm
Generating tags...
 - gcr.io/decent-space-249411/skaffold-helm -> gcr.io/decent-space-249411/skaffold-helm:latest
Checking cache...
 - gcr.io/decent-space-249411/skaffold-helm: Found Locally
Tags used in deployment:
 - gcr.io/decent-space-249411/skaffold-helm -> gcr.io/decent-space-249411/skaffold-helm:3987783aa1d45ad1c1ea91d31f52d51549db25986c58676ae1141f4ccd547b4c
   local images can't be referenced by digest. They are tagged and referenced by a unique ID instead
Starting deploy...
Helm release skaffold-helm not installed. Installing...
No requirements found in skaffold-helm/charts.
Error: validation failed: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"
WARN[0001] error retrieving helm deployment info: Error: release: "skaffold-helm" not found 
Cleaning up...
Error: release: "skaffold-helm" not found
FATA[0001] exiting dev mode because first deploy failed: deploying skaffold-helm: exit status 1 

Information

  • Skaffold version: v0.41.0
  • Operating system: macOS Catalina 10.15.1
  • Contents of skaffold.yaml:
apiVersion: skaffold/v1beta17
kind: Config
build:
  tagPolicy:
    sha256: {}
  artifacts:
  - image: gcr.io/decent-space-249411/skaffold-helm
deploy:
  helm:
    releases:
    - name: skaffold-helm
      chartPath: skaffold-helm
      #wait: true
      #valuesFiles:
      #- helm-skaffold-values.yaml
      values:
        image: gcr.io/decent-space-249411/skaffold-helm
      #recreatePods will pass --recreate-pods to helm upgrade
      #recreatePods: true
      #overrides builds an override values.yaml file to run with the helm deploy
      #overrides:
      # some:
      #   key: someValue
      #setValues get appended to the helm deploy with --set.
      #setValues:
        #some.key: someValue

https://github.com/GoogleContainerTools/skaffold/blob/master/examples/helm-deployment/skaffold.yaml

Steps to reproduce the behavior

  1. minikube start --kubernetes-version=v1.16.2
  2. kubectl apply -f ~/go/src/gitlab.com/cloudnative_impress/tutorial/chap06/helm/tiller-rbac.yaml
  3. helm init --service-account tiller
  4. git clone https://github.com/GoogleContainerTools/skaffold.git
  5. cd skaffold/examples/helm-deployment
  6. skaffold dev

Deployment apiVersion should be updated to apps/v1.

@balopat
Copy link
Contributor

balopat commented Nov 4, 2019

Thanks for opening @oke-py - I'm wondering how the upgraded examples will work against older clusters? Typically what we're aiming for is to support the oldest supported GKE cluster K8s version.

@oke-py
Copy link
Contributor Author

oke-py commented Nov 4, 2019

The v1.16 release will stop serving the following deprecated API versions in favor of newer and more stable API versions:

  • NetworkPolicy (in the extensions/v1beta1 API group)
    • Migrate to use the networking.k8s.io/v1 API, available since v1.8. Existing persisted data can be retrieved/updated via the networking.k8s.io/v1 API.
  • PodSecurityPolicy (in the extensions/v1beta1 API group)
    • Migrate to use the policy/v1beta1 API, available since v1.10. Existing persisted data can be retrieved/updated via the policy/v1beta1 API.
  • DaemonSet, Deployment, StatefulSet, and ReplicaSet (in the extensions/v1beta1 and apps/v1beta2 API groups)
    • Migrate to use the apps/v1 API, available since v1.9. Existing persisted data can be retrieved/updated via the apps/v1 API.

The v1.20 release will stop serving the following deprecated API versions in favor of newer and more stable API versions:

  • Ingress (in the extensions/v1beta1 API group)
    • Migrate to use the networking.k8s.io/v1beta1 API, serving Ingress since v1.14. Existing persisted data can be retrieved/updated via the networking.k8s.io/v1beta1 API.

https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/

1.9+ supports apps/v1 Deployment. Other examples already use apps/v1.
1.14+ supports networking.k8s.io/v1beta1 Ingress, extensions/v1beta1 Ingress has not yet removed. It might be better to keep using extensions/v1beta1 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working meta/examples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants