Skip to content

Commit

Permalink
Merge pull request #2410 from FillZpp/fix-doc-of-content-type
Browse files Browse the repository at this point in the history
馃摉 Add documentation to clarify the ContentType behavior
  • Loading branch information
k8s-ci-robot committed Jul 20, 2023
2 parents 93dd4b0 + 0b4b838 commit b1d6919
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ var (
NewWebhookManagedBy = builder.WebhookManagedBy

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

// CreateOrUpdate creates or updates the given object obj in the Kubernetes
Expand Down
3 changes: 3 additions & 0 deletions pkg/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ type LeaderElectionRunnable interface {
}

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

0 comments on commit b1d6919

Please sign in to comment.