-
Notifications
You must be signed in to change notification settings - Fork 311
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
[WIP] Get rid of kubectl depepdency in container image #1137
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c), NVIDIA CORPORATION. All rights reserved. | ||
* | ||
* 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. | ||
*/ | ||
|
||
// Package main uses the crdutil package to ensure CRDs are created | ||
// or updated in the cluster during Helm chart installation. | ||
package main | ||
|
||
import ( | ||
"github.com/NVIDIA/k8s-operator-libs/pkg/crdutil" | ||
) | ||
|
||
func main() { | ||
crdutil.EnsureCRDsCmd() | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,7 @@ operator: | |
use_ocp_driver_toolkit: false | ||
# cleanup CRD on chart un-install | ||
cleanupCRD: false | ||
imageCleanupCRD: bitnami/kubectl:1.31 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can use the upstream There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The cleanest approach would be to add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call, was also thinking about this. Let me add a command to delete CRDs to the cmdutil There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There may be other requirements in terms of using a thirdparty image. Implementing the required logic in code may be simpler in the long run. |
||
# upgrade CRD on chart upgrade, requires --disable-openapi-validation flag | ||
# to be passed during helm upgrade. | ||
upgradeCRD: true | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ require ( | |
github.com/Masterminds/sprig/v3 v3.3.0 | ||
github.com/NVIDIA/go-nvlib v0.7.0 | ||
github.com/NVIDIA/k8s-kata-manager v0.2.2 | ||
github.com/NVIDIA/k8s-operator-libs v0.0.0-20240826221728-249ba446fa35 | ||
github.com/NVIDIA/k8s-operator-libs v0.0.0-20241120073822-1ad8938d7274 | ||
github.com/NVIDIA/nvidia-container-toolkit v1.17.2 | ||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc | ||
github.com/go-logr/logr v1.4.2 | ||
|
@@ -169,14 +169,19 @@ require ( | |
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
helm.sh/helm/v3 v3.16.1 // indirect | ||
k8s.io/apiserver v0.31.2 // indirect | ||
k8s.io/cli-runtime v0.31.1 // indirect | ||
k8s.io/cli-runtime v0.31.2 // indirect | ||
k8s.io/component-base v0.31.2 // indirect | ||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect | ||
k8s.io/kubectl v0.31.0 // indirect | ||
k8s.io/kubectl v0.31.2 // indirect | ||
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect | ||
oras.land/oras-go v1.2.5 // indirect | ||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||
sigs.k8s.io/kustomize/api v0.17.2 // indirect | ||
sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect | ||
) | ||
|
||
// DROP BEFORE MERGE! | ||
// Implements https://github.com/NVIDIA/k8s-operator-libs/pull/58 | ||
// This is only for testing. | ||
replace github.com/NVIDIA/k8s-operator-libs => github.com/tobiasgiese/k8s-operator-libs v0.0.0-20241125092837-e8a080621717 | ||
Comment on lines
+184
to
+187
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. must be dropped before merging, just as a reminder |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other projects we using the following:
to auto-generate
make cmd-*
targets for any binary that we place incmd
. Would that be a useful addition here?