Documentation ¶
Overview ¶
Package platform allows to retrieve information about the current installed platform
Index ¶
- Constants
- Variables
- func ConfigureDefaults(ctx context.Context, c client.Client, p *v1.IntegrationPlatform, verbose bool) error
- func GetCurrent(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.IntegrationPlatform, error)
- func GetCurrentOperatorImage(ctx context.Context, c client.Client) (string, error)
- func GetKits() []string
- func GetKitsNames() []string
- func GetOperatorNamespace() string
- func GetOperatorPodName() string
- func GetOperatorWatchNamespace() string
- func GetOrFind(ctx context.Context, c k8sclient.Reader, namespace string, name string, ...) (*v1.IntegrationPlatform, error)
- func GetOrFindLocal(ctx context.Context, c k8sclient.Reader, namespace string, name string, ...) (*v1.IntegrationPlatform, error)
- func GetProfile(p *v1.IntegrationPlatform) v1.TraitProfile
- func IsActive(p *v1.IntegrationPlatform) bool
- func IsCurrentOperatorGlobal() bool
- func IsNamespaceLocked(ctx context.Context, c client.Client, namespace string) (bool, error)
- func IsOperatorAllowedOnNamespace(ctx context.Context, c client.Client, namespace string) (bool, error)
- func ListPlatforms(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.IntegrationPlatformList, error)
Constants ¶
const BuilderServiceAccount = "camel-k-builder"
BuilderServiceAccount --
const (
// DefaultPlatformName is the standard name used for the integration platform
DefaultPlatformName = "camel-k"
)
const OperatorLockName = "camel-k-lock"
const OperatorWatchNamespaceEnvVariable = "WATCH_NAMESPACE"
Variables ¶
var DefaultKits = []string{
"platform-integration-kit-jvm.yaml",
"platform-integration-kit-groovy.yaml",
"platform-integration-kit-kotlin.yaml",
}
DefaultKits --
var KnativeKits = []string{
"platform-integration-kit-knative.yaml",
}
KnativeKits --
Functions ¶
func ConfigureDefaults ¶
func ConfigureDefaults(ctx context.Context, c client.Client, p *v1.IntegrationPlatform, verbose bool) error
ConfigureDefaults fills with default values all missing details about the integration platform. Defaults are set in the status fields, not in the spec.
func GetCurrent ¶ added in v1.4.0
func GetCurrent(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.IntegrationPlatform, error)
GetCurrent returns the currently installed platform (local or global)
func GetCurrentOperatorImage ¶
GetCurrentOperatorImage returns the image currently used by the running operator if present (when running out of cluster, it may be absent).
func GetOperatorNamespace ¶
func GetOperatorNamespace() string
GetOperatorNamespace returns the namespace where the current operator is located (if set)
func GetOperatorPodName ¶
func GetOperatorPodName() string
GetOperatorPodName returns the pod that is running the current operator (if any)
func GetOperatorWatchNamespace ¶ added in v1.4.0
func GetOperatorWatchNamespace() string
GetOperatorWatchNamespace returns the namespace the operator watches
func GetOrFind ¶ added in v1.4.0
func GetOrFind(ctx context.Context, c k8sclient.Reader, namespace string, name string, active bool) (*v1.IntegrationPlatform, error)
GetOrFind returns the named platform or any other platform in the local namespace or the global one
func GetOrFindLocal ¶ added in v1.4.0
func GetOrFindLocal(ctx context.Context, c k8sclient.Reader, namespace string, name string, active bool) (*v1.IntegrationPlatform, error)
GetOrFindLocal returns the named platform or any other platform in the local namespace
func GetProfile ¶
func GetProfile(p *v1.IntegrationPlatform) v1.TraitProfile
GetProfile returns the current profile of the platform (if present) or returns the default one for the cluster
func IsActive ¶
func IsActive(p *v1.IntegrationPlatform) bool
IsActive determines if the given platform is being used
func IsCurrentOperatorGlobal ¶
func IsCurrentOperatorGlobal() bool
IsCurrentOperatorGlobal returns true if the operator is configured to watch all namespaces
func IsNamespaceLocked ¶ added in v1.3.0
IsNamespaceLocked tells if the namespace contains a lock indicating that an operator owns it
func IsOperatorAllowedOnNamespace ¶ added in v1.3.0
func IsOperatorAllowedOnNamespace(ctx context.Context, c client.Client, namespace string) (bool, error)
IsOperatorAllowedOnNamespace returns true if the current operator is allowed to react on changes in the given namespace
func ListPlatforms ¶
func ListPlatforms(ctx context.Context, c k8sclient.Reader, namespace string) (*v1.IntegrationPlatformList, error)
ListPlatforms returns all platforms installed in a given namespace (only one will be active)
Types ¶
This section is empty.