Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Make target to sync CRDS and remove profiles printcolumn as it is… #42

Merged
merged 3 commits into from
Aug 9, 2024
Merged
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
2 changes: 2 additions & 0 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
skip-cache: true
- name: Check golang modules
run: make check-vendor
- name: Check generated assets
run: make validate-generated-assets
test:
name: Unit test
runs-on: ubuntu-latest
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ generate-clientset: install-tools
--input-base $(CURDIR)/api \
--input "apps/v1alpha1"

validate-generated-assets: manifests generate generate-clientset
validate-generated-assets: manifests generate generate-clientset sync-crds
@echo "- Verifying that the generated code and manifests are in-sync..."
@git diff --exit-code -- api config

Expand Down Expand Up @@ -189,11 +189,18 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f -

.PHONY: install-tools
install-tools:
@echo Installing tools from tools.go
export GOBIN=$(PROJECT_DIR)/bin && \
grep '^\s*_' tools/tools.go | awk '{print $$2}' | xargs -tI % $(GO_CMD) install -mod=readonly -modfile=tools/go.mod %

.PHONY: sync-crds
sync-crds: manifests
@echo Syncing CRDs into Helm and OLM packages
cp $(PROJECT_DIR)/config/crd/bases/* deployments/helm/k8s-nim-operator/crds
cp $(PROJECT_DIR)/config/crd/bases/* bundle/manifests

##@ Dependencies

## Location to install dependencies to
Expand Down
1 change: 0 additions & 1 deletion api/apps/v1alpha1/nimcache_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ func (s *NIMSource) EnvFromSecrets() []v1.EnvFromSource {
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.state`,priority=0
// +kubebuilder:printcolumn:name="PVC",type=string,JSONPath=`.status.pvc`,priority=0
// +kubebuilder:printcolumn:name="Profiles",type=string,JSONPath=`.status.profiles`,priority=1
// +kubebuilder:printcolumn:name="Age",type=string,JSONPath=`.metadata.creationTimestamp`,priority=0

// NIMCache is the Schema for the nimcaches API
Expand Down
4 changes: 0 additions & 4 deletions bundle/manifests/apps.nvidia.com_nimcaches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ spec:
- jsonPath: .status.pvc
name: PVC
type: string
- jsonPath: .status.profiles
name: Profiles
priority: 1
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: string
Expand Down
4 changes: 0 additions & 4 deletions config/crd/bases/apps.nvidia.com_nimcaches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ spec:
- jsonPath: .status.pvc
name: PVC
type: string
- jsonPath: .status.profiles
name: Profiles
priority: 1
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ spec:
- jsonPath: .status.pvc
name: PVC
type: string
- jsonPath: .status.profiles
name: Profiles
priority: 1
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: string
Expand Down Expand Up @@ -266,7 +262,6 @@ spec:
type: object
type: array
required:
- resources
- source
- storage
type: object
Expand Down