sigs.k8s.io/kubebuilder/v3@v3.14.0/scripts/demo/run.sh (about) 1 #!/bin/bash 2 # Copyright 2016 The Kubernetes Authors. 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 clear 17 . $(dirname ${BASH_SOURCE})/util.sh 18 19 desc "Initialize Go modules" 20 run "go mod init demo.kubebuilder.io" 21 22 desc "Let's initialize the project" 23 run "kubebuilder init --domain tutorial.kubebuilder.io" 24 clear 25 26 desc "Examine scaffolded files..." 27 run "tree ." 28 clear 29 30 desc "Create our custom cronjob api" 31 run "kubebuilder create api --group batch --version v1 --kind CronJob" 32 clear 33 34 desc "Let's take a look at the API and Controller files" 35 run "tree ./api ./internal/controller" 36 clear 37 38 desc "Install CRDs in Kubernetes cluster" 39 run "make install" 40 clear 41 42 desc "Run controller manager locally" 43 run "make run"