Skip to content

Latest commit

 

History

History
62 lines (48 loc) · 3.09 KB

v0.32.md

File metadata and controls

62 lines (48 loc) · 3.09 KB

v0.30

Release notes

Upgrading from: v0.30.0, v0.31.*

What Changed from v0.30.0 and v0.31.*

CLI Changes (non-breaking)

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.

CUE Changes

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.

Breaking API Changes

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.

Behavior Changes

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.

Migration Steps

To migrate your CUE, if you specify frontend or backend in your codegen block, replace:

  • frontend: with ts: enabled:
  • backend: with go: 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, add operator.OpinionatedWatcherConfig{} as a final argument to the function (the same defaults will be applied)
  • If you call operator.NewOpinionatedWatcherWithFinalizer, change your call to operator.NewOpinionatedWatcher, and provide operator.OpinionatedWatcherConfig{ Informer: <your informer supplier from the WithFinalizer function> } as the config argument.