vmware-tanzu / cartographer

Cartographer is a Supply Chain Choreographer.
https://cartographer.sh
Apache License 2.0
447 stars 64 forks source link

Tutorial does not work on K8s 1.24 #986

Open asaikali opened 2 years ago

asaikali commented 2 years ago

On Page: Supply Chain Tutorial

The tutorial does not work on K8s 1.24 running in Docker Desktop. This seems to be related to change in K8s where ServiceAccounts don't get a token by default. See status of the Workload below. Tutorial should be updated with instructions that work on K8s 1.24

apiVersion: carto.run/v1alpha1
kind: Workload
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"carto.run/v1alpha1","kind":"Workload","metadata":{"annotations":{},"labels":{"workload-type":"pre-built"},"name":"hello","namespace":"default"},"spec":{"image":"docker.io/nginxdemos/hello:latest"}}
  creationTimestamp: "2022-08-21T21:08:27Z"
  generation: 1
  labels:
    workload-type: pre-built
  name: hello
  namespace: default
  resourceVersion: "2329124"
  uid: 4c0e1598-e228-4ba9-98f4-a95976edf7cb
spec:
  image: docker.io/nginxdemos/hello:latest
status:
  conditions:
  - lastTransitionTime: "2022-08-21T21:08:27Z"
    message: ""
    reason: Ready
    status: "True"
    type: SupplyChainReady
  - lastTransitionTime: "2022-08-21T21:08:27Z"
    message: service account [default/cartographer-pre-built-sa] does not have any
      secrets
    reason: ServiceAccountSecretError
    status: "False"
    type: ResourcesSubmitted
  - lastTransitionTime: "2022-08-21T21:08:27Z"
    message: service account [default/cartographer-pre-built-sa] does not have any
      secrets
    reason: ServiceAccountSecretError
    status: "False"
    type: Ready
  observedGeneration: 1
  supplyChainRef:
    kind: ClusterSupplyChain
    name: supply-chain
scothis commented 2 years ago

Cartographer v0.4.0 does not work on k8s 1.24 for the issue you called out. Try using Cartographer v0.5.0.

The cartographer.sh website should be updated to use v0.5.0 as the default. The readme install instructions should also be updated as I doubt k8s 1.19 is still supported.