Skip to content

Commit

Permalink
Add v2 PodTemplateSpec
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Oct 17, 2023
1 parent 4acfbc7 commit 3dc6c68
Show file tree
Hide file tree
Showing 6 changed files with 985 additions and 9 deletions.
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ DOCKER_REPO_ROOT := /go/src/$(GO_PKG)/$(REPO)

# Generate a typed clientset
.PHONY: clientset
clientset:
clientset: clientset_v1 clientset_v2
clientset_%:
@docker run --rm \
-u $$(id -u):$$(id -g) \
-v /tmp:/.cache \
Expand All @@ -113,13 +114,14 @@ clientset:
--env HTTPS_PROXY=$(HTTPS_PROXY) \
$(CODE_GENERATOR_IMAGE) \
deepcopy-gen \
--go-header-file "./hack/license/go.txt" \
--input-dirs "$(GO_PKG)/$(REPO)/api/v1" \
--go-header-file "./hack/license/go.txt" \
--input-dirs "$(GO_PKG)/$(REPO)/api/$*" \
--output-file-base zz_generated.deepcopy

# Generate openapi schema
.PHONY: openapi
openapi:
openapi: openapi_v1 openapi_v2
openapi_%:
@echo "Generating openapi schema"
@docker run --rm \
-u $$(id -u):$$(id -g) \
Expand All @@ -130,10 +132,10 @@ openapi:
--env HTTPS_PROXY=$(HTTPS_PROXY) \
$(CODE_GENERATOR_IMAGE) \
openapi-gen \
--v 1 --logtostderr \
--go-header-file "./hack/license/go.txt" \
--input-dirs "$(GO_PKG)/$(REPO)/api/v1" \
--output-package "$(GO_PKG)/$(REPO)/api/v1" \
--v 1 --logtostderr \
--go-header-file "./hack/license/go.txt" \
--input-dirs "$(GO_PKG)/$(REPO)/api/$*" \
--output-package "$(GO_PKG)/$(REPO)/api/$*" \
--report-filename /tmp/violation_exceptions.list

.PHONY: gen-crd-protos
Expand Down
20 changes: 20 additions & 0 deletions api/v2/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright AppsCode Inc. and Contributors
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.
*/

// +k8s:deepcopy-gen=package
// +k8s:openapi-gen=true
// +gencrdrefdocs:force=true
package v2 // import "kmodules.xyz/offshoot-api/api/v2"
Loading

0 comments on commit 3dc6c68

Please sign in to comment.