apiserver: k8s.io/apiserver/pkg/server/resourceconfig Index | Files

package resourceconfig

import "k8s.io/apiserver/pkg/server/resourceconfig"

Package resourceconfig contains the resource config related helper functions.


Package Files

doc.go helpers.go


const (
    APIAll   = "api/all"
    APIGA    = "api/ga"
    APIBeta  = "api/beta"
    APIAlpha = "api/alpha"

Recognized values for the --runtime-config parameter to enable/disable groups of APIs

func MergeAPIResourceConfigs Uses

func MergeAPIResourceConfigs(
    defaultAPIResourceConfig *serverstore.ResourceConfig,
    resourceConfigOverrides cliflag.ConfigurationMap,
    registry GroupVersionRegistry,
) (*serverstore.ResourceConfig, error)

MergeAPIResourceConfigs merges the given defaultAPIResourceConfig with the given resourceConfigOverrides. Exclude the groups not registered in registry, and check if version is not registered in group, then it will fail.

func MergeResourceEncodingConfigs Uses

func MergeResourceEncodingConfigs(
    defaultResourceEncoding *serverstore.DefaultResourceEncodingConfig,
    resourceEncodingOverrides []schema.GroupVersionResource,
) *serverstore.DefaultResourceEncodingConfig

MergeResourceEncodingConfigs merges the given defaultResourceConfig with specific GroupVersionResource overrides.

func ParseGroups Uses

func ParseGroups(resourceConfig cliflag.ConfigurationMap) ([]string, error)

ParseGroups takes in resourceConfig and returns parsed groups.

type GroupVersionRegistry Uses

type GroupVersionRegistry interface {
    // IsGroupRegistered returns true if given group is registered.
    IsGroupRegistered(group string) bool
    // IsVersionRegistered returns true if given version is registered.
    IsVersionRegistered(v schema.GroupVersion) bool
    // PrioritizedVersionsAllGroups returns all registered group versions.
    PrioritizedVersionsAllGroups() []schema.GroupVersion

GroupVersionRegistry provides access to registered group versions.

Package resourceconfig imports 9 packages (graph) and is imported by 64 packages. Updated 2020-05-19. Refresh now. Tools for package owners.