Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ required = [
name = "k8s.io/code-generator"
version = "kubernetes-1.9.3"

[[prune.project]]
name = "k8s.io/code-generator"
non-go = false
unused-packages = false

[[constraint]]
name = "gopkg.in/src-d/go-git.v4"
revision = "b08cc8dc5450981530af3e6f6ad1159ae8ea8705"
Expand Down
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,35 @@ go_generate_types: depend $(TYPES_FILES)
--input-dirs "$(PACKAGE_NAME)/pkg/apis/wing" \
--input-dirs "$(PACKAGE_NAME)/pkg/apis/wing/v1alpha1" \
--output-file-base zz_generated.conversion
# Generate the internal clientset (pkg/client/clientset_generated/internalclientset)
${BINDIR}/client-gen "$@" \
--go-header-file "${HACK_DIR}/boilerplate/boilerplate.go.txt" \
--input-base "github.com/jetstack/tarmak/pkg/apis/" \
--input "wing" \
--clientset-path "github.com/jetstack/tarmak/pkg/wing/clients" \
--clientset-name internalclientset \
# Generate the versioned clientset (pkg/client/clientset_generated/clientset)
${BINDIR}/client-gen "$@" \
--go-header-file "${HACK_DIR}/boilerplate/boilerplate.go.txt" \
--input-base "github.com/jetstack/tarmak/pkg/apis/" \
--input "wing/v1alpha1" \
--clientset-path "github.com/jetstack/tarmak/pkg/wing" \
--clientset-name "client" \
# generate lister
${BINDIR}/lister-gen "$@" \
--go-header-file "${HACK_DIR}/boilerplate/boilerplate.go.txt" \
--input-dirs="github.com/jetstack/tarmak/pkg/apis/wing" \
--input-dirs="github.com/jetstack/tarmak/pkg/apis/wing/v1alpha1" \
--output-package "github.com/jetstack/tarmak/pkg/wing/listers" \
# generate informer
${BINDIR}/informer-gen "$@" \
--go-header-file "${HACK_DIR}/boilerplate/boilerplate.go.txt" \
--input-dirs="github.com/jetstack/tarmak/pkg/apis/wing" \
--input-dirs="github.com/jetstack/tarmak/pkg/apis/wing/v1alpha1" \
--internal-clientset-package "github.com/jetstack/tarmak/pkg/wing/clients/internalclientset" \
--versioned-clientset-package "github.com/jetstack/tarmak/pkg/wing/client" \
--listers-package "github.com/jetstack/tarmak/pkg/wing/listers" \
--output-package "github.com/jetstack/tarmak/pkg/wing/informers"
# generate all pkg/client contents
$(HACK_DIR)/update-client-gen.sh

Expand Down
1 change: 0 additions & 1 deletion cmd/wing/cmd/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func init() {

agentCmd.Flags().StringVar(&agentFlags.ClusterName, "cluster-name", "myenv-mycluster", "this specifies the cluster name [environment]-[cluster]")
agentCmd.Flags().StringVar(&agentFlags.ServerURL, "server-url", "https://localhost:9443", "this specifies the URL to the wing server")
agentCmd.Flags().StringVar(&agentFlags.ManifestURL, "manifest-url", "", "this specifies the URL where the puppet.tar.gz can be found")
agentCmd.Flags().StringVar(&agentFlags.InstanceName, "instance-name", instanceName, "this specifies the instance's name")

RootCmd.AddCommand(agentCmd)
Expand Down
38 changes: 7 additions & 31 deletions hack/update-client-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,11 @@ set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE}")/.."; pwd)
BINDIR=${REPO_ROOT}/bin
SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}

# Generate the internal clientset (pkg/client/clientset_generated/internalclientset)
${BINDIR}/client-gen "$@" \
--go-header-file "${REPO_ROOT}/hack/boilerplate/boilerplate.go.txt" \
--input-base "github.com/jetstack/tarmak/pkg/apis/" \
--input "wing" \
--clientset-path "github.com/jetstack/tarmak/pkg/wing/clients" \
--clientset-name internalclientset \
# Generate the versioned clientset (pkg/client/clientset_generated/clientset)
${BINDIR}/client-gen "$@" \
--go-header-file "${REPO_ROOT}/hack/boilerplate/boilerplate.go.txt" \
--input-base "github.com/jetstack/tarmak/pkg/apis/" \
--input "wing/v1alpha1" \
--clientset-path "github.com/jetstack/tarmak/pkg/wing" \
--clientset-name "client" \
# generate lister
${BINDIR}/lister-gen "$@" \
--go-header-file "${REPO_ROOT}/hack/boilerplate/boilerplate.go.txt" \
--input-dirs="github.com/jetstack/tarmak/pkg/apis/wing" \
--input-dirs="github.com/jetstack/tarmak/pkg/apis/wing/v1alpha1" \
--output-package "github.com/jetstack/tarmak/pkg/wing/listers" \
# generate informer
${BINDIR}/informer-gen "$@" \
--go-header-file "${REPO_ROOT}/hack/boilerplate/boilerplate.go.txt" \
--input-dirs="github.com/jetstack/tarmak/pkg/apis/wing" \
--input-dirs="github.com/jetstack/tarmak/pkg/apis/wing/v1alpha1" \
--internal-clientset-package "github.com/jetstack/tarmak/pkg/wing/clients/internalclientset" \
--versioned-clientset-package "github.com/jetstack/tarmak/pkg/wing/client" \
--listers-package "github.com/jetstack/tarmak/pkg/wing/listers" \
--output-package "github.com/jetstack/tarmak/pkg/wing/informers"
${CODEGEN_PKG}/generate-internal-groups.sh all \
github.com/jetstack/tarmak/pkg/client github.com/jetstack/tarmak/pkg/apis github.com/jetstack/tarmak/pkg/apis \
wing:v1alpha1 \
--output-base "${GOPATH}/src/" \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt
Loading