Documentation
¶
Overview ¶
Copyright 2019 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func CheckDeployments(kube kubernetes.Interface, manifest *mf.Manifest, ...) error
- func ClusterScopedResource(apiVersion, kind, name string) *unstructured.Unstructured
- func ConfigMapTransform(config v1alpha1.ConfigMapData, log *zap.SugaredLogger) mf.Transformer
- func FinalizerRemovalPatch(obj v1alpha1.KComponent, toRemove string) ([]byte, error)
- func GetLatestRelease(kcomponent string) string
- func ImageTransform(registry *v1alpha1.Registry, log *zap.SugaredLogger) mf.Transformer
- func Install(manifest *mf.Manifest, version string, status v1alpha1.KComponentStatus) error
- func ListReleases(kComponent string) ([]string, error)
- func NamespacedResource(apiVersion, kind, ns, name string) *unstructured.Unstructured
- func ResourceRequirementsTransform(resources []v1alpha1.ResourceRequirementsOverride, log *zap.SugaredLogger) mf.Transformer
- func RetrieveManifestPath(version, kcomponent string) string
- func Transformers(ctx context.Context, obj v1alpha1.KComponent) []mf.Transformer
- func Uninstall(manifest *mf.Manifest) error
- func UpdateConfigMap(cm *unstructured.Unstructured, data map[string]string, log *zap.SugaredLogger) error
- func WithPlatforms(ctx context.Context, pf Platforms) context.Context
- type Platforms
Constants ¶
const (
KoEnvKey = "KO_DATA_PATH"
)
Variables ¶
This section is empty.
Functions ¶
func CheckDeployments ¶
func CheckDeployments(kube kubernetes.Interface, manifest *mf.Manifest, status v1alpha1.KComponentStatus) error
CheckDeployments checks all deployments in the given manifest and updates the given status with the status of the deployments.
func ClusterScopedResource ¶
func ClusterScopedResource(apiVersion, kind, name string) *unstructured.Unstructured
ClusterScopedResource is an unstructured resource with the given apiVersion, kind and name.
func ConfigMapTransform ¶
func ConfigMapTransform(config v1alpha1.ConfigMapData, log *zap.SugaredLogger) mf.Transformer
ConfigMapTransform updates the ConfigMap with the values specified in operator CR
func FinalizerRemovalPatch ¶
func FinalizerRemovalPatch(obj v1alpha1.KComponent, toRemove string) ([]byte, error)
FinalizerRemovalPatch generates a patch for removing the given finalizer.
func GetLatestRelease ¶
GetLatestRelease returns the latest release tag available under kodata directory for Knative component.
func ImageTransform ¶
func ImageTransform(registry *v1alpha1.Registry, log *zap.SugaredLogger) mf.Transformer
ImageTransform updates image with a new registry and tag
func Install ¶
Install applies the manifest resources for the given version and updates the given status accordingly.
func ListReleases ¶
ListReleases returns the all the available release versions available under kodata directory for Knative component.
func NamespacedResource ¶
func NamespacedResource(apiVersion, kind, ns, name string) *unstructured.Unstructured
NamespacedResource is an unstructured resource with the given apiVersion, kind, ns and name.
func ResourceRequirementsTransform ¶
func ResourceRequirementsTransform(resources []v1alpha1.ResourceRequirementsOverride, log *zap.SugaredLogger) mf.Transformer
ResourceRequirementsTransform configures the resource requests for all containers within all deployments in the manifest
func RetrieveManifestPath ¶
RetrieveManifestPath returns the manifest path for Knative based a provided version and component
func Transformers ¶
func Transformers(ctx context.Context, obj v1alpha1.KComponent) []mf.Transformer
Transformers returns transformers that are common to all components.
func Uninstall ¶
Uninstall removes all resources except CRDs, which are never deleted automatically.
func UpdateConfigMap ¶
func UpdateConfigMap(cm *unstructured.Unstructured, data map[string]string, log *zap.SugaredLogger) error
UpdateConfigMap set some data in a configmap, only overwriting common keys if they differ
Types ¶
type Platforms ¶
type Platforms []func(kubernetes.Interface, *zap.SugaredLogger) (mf.Transformer, error)
func GetPlatforms ¶
GetPlatforms extracts the Platforms from the context.
func (Platforms) Transformers ¶
func (platforms Platforms) Transformers(kubeClientSet kubernetes.Interface, slog *zap.SugaredLogger) ([]mf.Transformer, error)