Skip to content

Commit 0b4b838

Browse files
committed
Add documentation to clarify the ContentType behavior
Signed-off-by: FillZpp <[email protected]>
1 parent 56a973c commit 0b4b838

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

alias.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ var (
110110
NewWebhookManagedBy = builder.WebhookManagedBy
111111

112112
// NewManager returns a new Manager for creating Controllers.
113+
// Note that if ContentType in the given config is not set, "application/vnd.kubernetes.protobuf"
114+
// will be used for all built-in resources of Kubernetes, and "application/json" is for other types
115+
// including all CRD resources.
113116
NewManager = manager.New
114117

115118
// CreateOrUpdate creates or updates the given object obj in the Kubernetes

pkg/manager/manager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,9 @@ type LeaderElectionRunnable interface {
390390
}
391391

392392
// New returns a new Manager for creating Controllers.
393+
// Note that if ContentType in the given config is not set, "application/vnd.kubernetes.protobuf"
394+
// will be used for all built-in resources of Kubernetes, and "application/json" is for other types
395+
// including all CRD resources.
393396
func New(config *rest.Config, options Options) (Manager, error) {
394397
// Set default values for options fields
395398
options = setOptionsDefaults(options)

0 commit comments

Comments
 (0)