mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Feature] Expose Force CRD Install option (#1625)
This commit is contained in:
parent
72be29c602
commit
6d3100c860
2 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
- (Feature) (ML) Use Scheduler API
|
||||
- (Feature) (Scheduler) Introduce Scheduler CRD
|
||||
- (Feature) Discover Namespace in DebugPackage from K8S
|
||||
- (Feature) Expose Force CRD Install option
|
||||
|
||||
## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11)
|
||||
- (Feature) Extract Scheduler API
|
||||
|
|
|
@ -52,6 +52,7 @@ var (
|
|||
var (
|
||||
crdInstallOptions struct {
|
||||
validationSchema []string
|
||||
force bool
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -65,6 +66,7 @@ func init() {
|
|||
|
||||
f := cmdCRDInstall.Flags()
|
||||
f.StringArrayVar(&crdInstallOptions.validationSchema, "crd.validation-schema", defaultValidationSchemaEnabled, "Controls which CRD should have validation schema <crd-name>=<true/false>.")
|
||||
f.BoolVar(&crdInstallOptions.force, "crd.force-update", false, "Enforce CRD Schema update")
|
||||
cmdCRD.AddCommand(cmdCRDInstall)
|
||||
}
|
||||
|
||||
|
@ -109,7 +111,7 @@ func cmdCRDInstallRun(cmd *cobra.Command, args []string) {
|
|||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
||||
defer cancel()
|
||||
|
||||
err = crd.EnsureCRDWithOptions(ctx, client, crd.EnsureCRDOptions{IgnoreErrors: false, CRDOptions: crdOpts})
|
||||
err = crd.EnsureCRDWithOptions(ctx, client, crd.EnsureCRDOptions{IgnoreErrors: false, CRDOptions: crdOpts, ForceUpdate: crdInstallOptions.force})
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue