Skip to content

Implement missing features for multi-cluster client-go #110

@xrstf

Description

@xrstf

Since refactoring the code-generator to v3, we lost some CLI flags that kcp's client-go is using to generate code: https://github.com/kcp-dev/client-go/blob/kcp-1.32.3/hack/update-codegen.sh effectively does (formatted for readability):

${CODE_GENERATOR} \
client
  externalOnly=true
  standalone=true
  outputPackagePath=github.com/kcp-dev/client-go
  name=kubernetes
  apiPackagePath=k8s.io/api
  singleClusterClientPackagePath=k8s.io/client-go/kubernetes
  singleClusterApplyConfigurationsPackagePath=k8s.io/client-go/applyconfigurations
  headerFile=./hack/boilerplate/boilerplate.go.txt
lister
  apiPackagePath=k8s.io/api
  singleClusterListerPackagePath=k8s.io/client-go/listers
  headerFile=./hack/boilerplate/boilerplate.go.txt
informer
  clientsetName=kubernetes
  externalOnly=true
  standalone=true
  outputPackagePath=github.com/kcp-dev/client-go
  apiPackagePath=k8s.io/api
  singleClusterClientPackagePath=k8s.io/client-go/kubernetes
  singleClusterListerPackagePath=k8s.io/client-go/listers
  singleClusterInformerPackagePath=k8s.io/client-go/informers
  headerFile=./hack/boilerplate/boilerplate.go.txt
"paths=$( go list -m -json k8s.io/api | jq --raw-output .Dir )/..." \
  "output:dir=./"

I only got so far that client.externalOnly, client.standalone and client.apiPackagePath are probably features/flags we do not yet support in v3. This means in our client-go repository we currently still have to use the v2 generator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions