Upgrading from: v0.30.0, v0.31.*
The flag --noschemasinmanifest
has been introduced, which can be used to prevent OpenAPI schemas from being generated in the go manifest.
This should be used when dealing with recursion that the go code generation via cog can handle, but CUE's OpenAPI conversion cannot.
This flag is temporary and will be removed once #460 is resolved.
If you need to use this flag, you will also likely need to disable CRD generation (as it uses the same OpenAPI converter) with --defencoding=none
.
The structure of the codegen
block in CUE kinds has changed. It now is defined as:
codegen: {
ts: {
enabled: bool | *true
config: {
importsMap: {
[string]: string
}
enumsAsUnionTypes: bool | *false
}
}
go: {
enabled: bool | *true
config: {}
}
}
This is a change from generic naming (frontend
for TypeScript and backend
for go) to language-specific naming, and the ability to pass along configuration to the generator (cog).
See the full definition for comments on the options.
operator.NewOpinionatedWatcher
has an additional operator.OpinionatedWatcherConfig
parameter.
This configuration object contains the finalizer supplier previously provided in operator.NewOpinionatedWatcherWithFinalizer
.
As such, operator.NewOpinionatedWatcherWithFinalizer
has been removed.
operator.OpinionatedWatcher
now uses an additional "in-progress" finalizer while handling Add
events
(this is to resolve [OpinionatedWatcher] Delete events are not received when Add fails or is still retrying).
This finalizer can be customized with operator.OpinionatedWatcherConfig.InProgressFinalizerSupplier
.
When using simple.App
, it can be customized with simple.AppInformerConfig.InProgressFinalizerSupplier
.
This finalizer is replaced with the normal finalizer at the conclusion of a successful Add
event.
To migrate your CUE, if you specify frontend
or backend
in your codegen
block, replace:
frontend:
withts: enabled:
backend:
withgo: enabled:
This will make sure enabled/disabling generation will still be parsed by the CLI.
If you directly use operator.OpinionatedWatcher
(not via simple.App
or simple.Operator
):
- If you call
operator.NewOpinionatedWatcher
, addoperator.OpinionatedWatcherConfig{}
as a final argument to the function (the same defaults will be applied) - If you call
operator.NewOpinionatedWatcherWithFinalizer
, change your call tooperator.NewOpinionatedWatcher
, and provideoperator.OpinionatedWatcherConfig{ Informer: <your informer supplier from the WithFinalizer function> }
as the config argument.