Skip to content

Instantly share code, notes, and snippets.

@pwittrock
Last active August 19, 2018 18:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pwittrock/4e1db5f7281bf9a321295bfbcb0abf27 to your computer and use it in GitHub Desktop.
Save pwittrock/4e1db5f7281bf9a321295bfbcb0abf27 to your computer and use it in GitHub Desktop.
apiserver-builder demo

apiserver-builder demo

Uses v0.1-alpha.21

boilerplate.go.txt

/*
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

Steps

# reset environment
minikube delete; minikube start
cp ~/boilerplate.go.txt .

# Create a new project, create a new resource, run the extension control plane
apiserver-boot init repo --domain example.com
apiserver-boot create resource --group bar --version v1alpha1  --kind Foo
apiserver-boot run local

# Verify the new resource and control plane
kubectl --kubeconfig kubeconfig api-versions
kubectl --kubeconfig kubeconfig apply -f sample/foo.yaml
kubectl --kubeconfig kubeconfig get foos foo-example

# Build the reference documentation
apiserver-boot build docs

With minikube

apiserver-boot build config --local-minikube --name test --namespace default
kubectl apply -f config/apiserver.yaml
apiserver-boot run local-minikube --build=false

Build only

apiserver-boot build executables

Build with bazel

apiserver-boot build executables --bazel --gazelle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment