File tree Expand file tree Collapse file tree 21 files changed +218
-70
lines changed
cronjob-tutorial/testdata/project
getting-started/testdata/project
multiversion-tutorial/testdata/project
pkg/plugins/golang/v4/scaffolds/internal/templates Expand file tree Collapse file tree 21 files changed +218
-70
lines changed Original file line number Diff line number Diff line change 11# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2- # Ignore build and test binaries.
2+ # VCS & tooling
3+ .git
4+ .github
5+ .DS_Store
6+
7+ # Build artifacts
38bin /
9+ dist /
10+
11+ # Utilities
12+ hack /
13+
14+ # Go junk you don't want in the image
15+ ** /* _test.go
16+ coverage. *
17+ * .log
18+
19+ # If you use vendor, remove this ignore or whitelist it instead
20+ vendor /
Original file line number Diff line number Diff line change @@ -12,9 +12,7 @@ COPY go.sum go.sum
1212RUN go mod download
1313
1414# Copy the go source
15- COPY cmd/main.go cmd/main.go
16- COPY api/ api/
17- COPY internal/ internal/
15+ COPY . .
1816
1917# Build
2018# the GOARCH has not a default value to allow the binary be built according to the host where the command
Original file line number Diff line number Diff line change @@ -157,14 +157,20 @@ ifndef ignore-not-found
157157endif
158158
159159.PHONY : install
160- install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config. No-op if none exist.
161- @out=" $$ ( $( KUSTOMIZE) build config/crd 2>/dev/null || true )" ; \
162- if [ -n " $$ out" ]; then echo " $$ out" | $( KUBECTL) apply -f -; else echo " No CRDs to install; skipping." ; fi
160+ install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config.
161+ @if [ -d config/crd ] && [ -f config/crd/kustomization.yaml ]; then \
162+ $(KUBECTL ) apply -k config/crd; \
163+ else \
164+ echo " No CRDs to install; skipping." ; \
165+ fi
163166
164167.PHONY : uninstall
165- uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. No-op if none exist.
166- @out=" $$ ( $( KUSTOMIZE) build config/crd 2>/dev/null || true )" ; \
167- if [ -n " $$ out" ]; then echo " $$ out" | $( KUBECTL) delete --ignore-not-found=$( ignore-not-found) -f -; else echo " No CRDs to delete; skipping." ; fi
168+ uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
169+ @if [ -d config/crd ] && [ -f config/crd/kustomization.yaml ]; then \
170+ $(KUBECTL ) delete -k config/crd --ignore-not-found=$(ignore-not-found ) ; \
171+ else \
172+ echo " No CRDs to delete; skipping." ; \
173+ fi
168174
169175.PHONY : deploy
170176deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
Original file line number Diff line number Diff line change 11# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2- # Ignore build and test binaries.
2+ # VCS & tooling
3+ .git
4+ .github
5+ .DS_Store
6+
7+ # Build artifacts
38bin /
9+ dist /
10+
11+ # Utilities
12+ hack /
13+
14+ # Go junk you don't want in the image
15+ ** /* _test.go
16+ coverage. *
17+ * .log
18+
19+ # If you use vendor, remove this ignore or whitelist it instead
20+ vendor /
Original file line number Diff line number Diff line change @@ -12,9 +12,7 @@ COPY go.sum go.sum
1212RUN go mod download
1313
1414# Copy the go source
15- COPY cmd/main.go cmd/main.go
16- COPY api/ api/
17- COPY internal/ internal/
15+ COPY . .
1816
1917# Build
2018# the GOARCH has not a default value to allow the binary be built according to the host where the command
Original file line number Diff line number Diff line change @@ -153,14 +153,20 @@ ifndef ignore-not-found
153153endif
154154
155155.PHONY : install
156- install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config. No-op if none exist.
157- @out=" $$ ( $( KUSTOMIZE) build config/crd 2>/dev/null || true )" ; \
158- if [ -n " $$ out" ]; then echo " $$ out" | $( KUBECTL) apply -f -; else echo " No CRDs to install; skipping." ; fi
156+ install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config.
157+ @if [ -d config/crd ] && [ -f config/crd/kustomization.yaml ]; then \
158+ $(KUBECTL ) apply -k config/crd; \
159+ else \
160+ echo " No CRDs to install; skipping." ; \
161+ fi
159162
160163.PHONY : uninstall
161- uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. No-op if none exist.
162- @out=" $$ ( $( KUSTOMIZE) build config/crd 2>/dev/null || true )" ; \
163- if [ -n " $$ out" ]; then echo " $$ out" | $( KUBECTL) delete --ignore-not-found=$( ignore-not-found) -f -; else echo " No CRDs to delete; skipping." ; fi
164+ uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
165+ @if [ -d config/crd ] && [ -f config/crd/kustomization.yaml ]; then \
166+ $(KUBECTL ) delete -k config/crd --ignore-not-found=$(ignore-not-found ) ; \
167+ else \
168+ echo " No CRDs to delete; skipping." ; \
169+ fi
164170
165171.PHONY : deploy
166172deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
Original file line number Diff line number Diff line change 11# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2- # Ignore build and test binaries.
2+ # VCS & tooling
3+ .git
4+ .github
5+ .DS_Store
6+
7+ # Build artifacts
38bin /
9+ dist /
10+
11+ # Utilities
12+ hack /
13+
14+ # Go junk you don't want in the image
15+ ** /* _test.go
16+ coverage. *
17+ * .log
18+
19+ # If you use vendor, remove this ignore or whitelist it instead
20+ vendor /
Original file line number Diff line number Diff line change @@ -12,9 +12,7 @@ COPY go.sum go.sum
1212RUN go mod download
1313
1414# Copy the go source
15- COPY cmd/main.go cmd/main.go
16- COPY api/ api/
17- COPY internal/ internal/
15+ COPY . .
1816
1917# Build
2018# the GOARCH has not a default value to allow the binary be built according to the host where the command
Original file line number Diff line number Diff line change @@ -157,14 +157,20 @@ ifndef ignore-not-found
157157endif
158158
159159.PHONY : install
160- install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config. No-op if none exist.
161- @out=" $$ ( $( KUSTOMIZE) build config/crd 2>/dev/null || true )" ; \
162- if [ -n " $$ out" ]; then echo " $$ out" | $( KUBECTL) apply -f -; else echo " No CRDs to install; skipping." ; fi
160+ install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config.
161+ @if [ -d config/crd ] && [ -f config/crd/kustomization.yaml ]; then \
162+ $(KUBECTL ) apply -k config/crd; \
163+ else \
164+ echo " No CRDs to install; skipping." ; \
165+ fi
163166
164167.PHONY : uninstall
165- uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. No-op if none exist.
166- @out=" $$ ( $( KUSTOMIZE) build config/crd 2>/dev/null || true )" ; \
167- if [ -n " $$ out" ]; then echo " $$ out" | $( KUBECTL) delete --ignore-not-found=$( ignore-not-found) -f -; else echo " No CRDs to delete; skipping." ; fi
168+ uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
169+ @if [ -d config/crd ] && [ -f config/crd/kustomization.yaml ]; then \
170+ $(KUBECTL ) delete -k config/crd --ignore-not-found=$(ignore-not-found ) ; \
171+ else \
172+ echo " No CRDs to delete; skipping." ; \
173+ fi
168174
169175.PHONY : deploy
170176deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
Original file line number Diff line number Diff line change 11/*
2+
23Copyright 2022 The Kubernetes Authors.
34
45Licensed under the Apache License, Version 2.0 (the "License");
@@ -52,9 +53,7 @@ COPY go.sum go.sum
5253RUN go mod download
5354
5455# Copy the go source
55- COPY cmd/main.go cmd/main.go
56- COPY api/ api/
57- COPY internal/ internal/
56+ COPY . .
5857
5958# Build
6059# the GOARCH has not a default value to allow the binary be built according to the host where the command
You can’t perform that action at this time.
0 commit comments