Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertToUnstructured(webhook admissionv1.MutatingWebhookConfiguration) (*unstructured.Unstructured, error)
- func GetSecret(client client.Client, name string, namespace string) (*corev1.Secret, error)
- func GetWorkspaceDirs(dir string) []string
- func GetWorkspaceName(dir string) (string, error)
- func IsWorkspace(dir string) bool
- func ListFiles(dir string) ([]string, error)
- func MatchesCondition(release *unstructured.Unstructured, conditionType string) bool
- func MergeJSON(a, b apiextensionsv1.JSON) (apiextensionsv1.JSON, error)
- func MergeValuesAndServices(inst *v1alpha1.PlatformMesh, templateVars apiextensionsv1.JSON) (apiextensionsv1.JSON, error)
- func ReplaceTemplate(templateData map[string]string, templateBytes []byte) ([]byte, error)
- func TemplateVars(ctx context.Context, inst *v1alpha1.PlatformMesh, cl client.Client) (apiextensionsv1.JSON, error)
- type DefaultHelmGetter
- type DeploymentSubroutine
- func (s *DeploymentSubroutine) ApplyManifestFromFileWithMergedValues(ctx context.Context, path string, k8sClient client.Client, ...) error
- func (s *DeploymentSubroutine) ApplyReleaseWithValues(ctx context.Context, path string, k8sClient client.Client, ...) error
- func (r *DeploymentSubroutine) Finalize(_ context.Context, _ runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
- func (r *DeploymentSubroutine) Finalizers() []string
- func (r *DeploymentSubroutine) GetName() string
- func (r *DeploymentSubroutine) Process(ctx context.Context, runtimeObj runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
- type HelmGetter
- type Helper
- type KcpHelper
- type KcpsetupSubroutine
- func (r *KcpsetupSubroutine) ApplyDirStructure(ctx context.Context, dir string, kcpPath string, config *rest.Config, ...) error
- func (r *KcpsetupSubroutine) ApplyManifestFromFile(ctx context.Context, path string, k8sClient client.Client, ...) error
- func (r *KcpsetupSubroutine) CreateKcpResources(ctx context.Context, config *rest.Config, dir string, ...) error
- func (r *KcpsetupSubroutine) Finalize(ctx context.Context, runtimeObj runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
- func (r *KcpsetupSubroutine) Finalizers() []string
- func (r *KcpsetupSubroutine) GetAPIExportHashInventory(ctx context.Context, config *rest.Config) (map[string]string, error)
- func (r *KcpsetupSubroutine) GetCABundleInventory(ctx context.Context) (map[string]string, error)
- func (r *KcpsetupSubroutine) GetCaBundle(ctx context.Context, webhookConfig *corev1alpha1.WebhookConfiguration) ([]byte, error)
- func (r *KcpsetupSubroutine) GetName() string
- func (r *KcpsetupSubroutine) Process(ctx context.Context, runtimeObj runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
- func (s *KcpsetupSubroutine) UnstructuredFromFile(path string, templateData map[string]string, log *logger.Logger) (unstructured.Unstructured, error)
- func (r *KcpsetupSubroutine) WaitForWorkspace(ctx context.Context, config *rest.Config, name string, log *logger.Logger) error
- type ProvidersecretSubroutine
- func (r *ProvidersecretSubroutine) Finalize(ctx context.Context, runtimeObj runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
- func (r *ProvidersecretSubroutine) Finalizers() []string
- func (r *ProvidersecretSubroutine) GetName() string
- func (r *ProvidersecretSubroutine) HandleInitializerConnection(ctx context.Context, instance *corev1alpha1.PlatformMesh, ...) (ctrl.Result, errors.OperatorError)
- func (r *ProvidersecretSubroutine) HandleProviderConnection(ctx context.Context, instance *corev1alpha1.PlatformMesh, ...) (ctrl.Result, errors.OperatorError)
- func (r *ProvidersecretSubroutine) Process(ctx context.Context, runtimeObj runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
Constants ¶
View Source
const ( KcpsetupSubroutineName = "KcpsetupSubroutine" KcpsetupSubroutineFinalizer = "platform-mesh.core.platform-mesh.io/finalizer" )
View Source
const ( ProvidersecretSubroutineName = "ProvidersecretSubroutine" ProvidersecretSubroutineFinalizer = "platform-mesh.core.platform-mesh.io/finalizer" )
View Source
const DeploymentSubroutineName = "DeploymentSubroutine"
Variables ¶
View Source
var AccountOperatorMutatingWebhookName = "account-operator.webhooks.core.platform-mesh.io"
View Source
var AccountOperatorValidatingWebhookName = "organization-validator.webhooks.core.platform-mesh.io"
View Source
var AccountOperatorWebhookSecretName = "account-operator-webhook-server-cert"
View Source
var AccountOperatorWebhookSecretNamespace = "platform-mesh-system"
View Source
var AccountOperatorWorkspace = "root:platform-mesh-system"
View Source
var DEFAULT_VALIDATING_WEBHOOK_CONFIGURATION = corev1alpha1.WebhookConfiguration{ SecretRef: corev1alpha1.SecretReference{ Name: AccountOperatorWebhookSecretName, Namespace: AccountOperatorWebhookSecretNamespace, }, SecretData: DefaultCASecretKey, WebhookRef: corev1alpha1.KCPAPIVersionKindRef{ ApiVersion: "admissionregistration.k8s.io/v1", Kind: "ValidatingWebhookConfiguration", Name: AccountOperatorValidatingWebhookName, Path: AccountOperatorWorkspace, }, }
View Source
var DEFAULT_WEBHOOK_CONFIGURATION = corev1alpha1.WebhookConfiguration{ SecretRef: corev1alpha1.SecretReference{ Name: AccountOperatorWebhookSecretName, Namespace: AccountOperatorWebhookSecretNamespace, }, SecretData: DefaultCASecretKey, WebhookRef: corev1alpha1.KCPAPIVersionKindRef{ ApiVersion: "admissionregistration.k8s.io/v1", Kind: "MutatingWebhookConfiguration", Name: AccountOperatorMutatingWebhookName, Path: AccountOperatorWorkspace, }, }
View Source
var DefaultCASecretKey = "ca.crt"
View Source
var DefaultInitializerConnection = []corev1alpha1.InitializerConnection{
{
WorkspaceTypeName: "security",
Path: "root",
Secret: "security-initializer-kubeconfig",
},
}
View Source
var DefaultProviderConnections = []corev1alpha1.ProviderConnection{
{
EndpointSliceName: "core.platform-mesh.io",
Path: "root:platform-mesh-system",
Secret: "account-operator-kubeconfig",
},
{
EndpointSliceName: "core.platform-mesh.io",
Path: "root:platform-mesh-system",
Secret: "rebac-authz-webhook-kubeconfig",
},
{
EndpointSliceName: "core.platform-mesh.io",
Path: "root:platform-mesh-system",
Secret: "security-operator-kubeconfig",
},
{
EndpointSliceName: "core.platform-mesh.io",
Path: "root:platform-mesh-system",
Secret: "kubernetes-grapqhl-gateway-kubeconfig",
},
{
EndpointSliceName: "core.platform-mesh.io",
Path: "root:platform-mesh-system",
Secret: "extension-manager-operator-kubeconfig",
},
{
EndpointSliceName: "",
RawPath: "/services/contentconfigurations",
Secret: "portal-kubeconfig",
},
}
Functions ¶
func ConvertToUnstructured ¶
func ConvertToUnstructured(webhook admissionv1.MutatingWebhookConfiguration) (*unstructured.Unstructured, error)
func GetWorkspaceDirs ¶
func GetWorkspaceName ¶
func IsWorkspace ¶
func MatchesCondition ¶ added in v0.4.10
func MatchesCondition(release *unstructured.Unstructured, conditionType string) bool
MatchesCondition checks the Ready Condition if it has status true
func MergeJSON ¶
func MergeJSON(a, b apiextensionsv1.JSON) (apiextensionsv1.JSON, error)
func MergeValuesAndServices ¶
func MergeValuesAndServices(inst *v1alpha1.PlatformMesh, templateVars apiextensionsv1.JSON) (apiextensionsv1.JSON, error)
func ReplaceTemplate ¶
func TemplateVars ¶
func TemplateVars(ctx context.Context, inst *v1alpha1.PlatformMesh, cl client.Client) (apiextensionsv1.JSON, error)
Types ¶
type DefaultHelmGetter ¶
type DefaultHelmGetter struct{}
DefaultHelmGetter is the default implementation of HelmGetter
func (DefaultHelmGetter) GetRelease ¶
func (g DefaultHelmGetter) GetRelease(ctx context.Context, cli client.Client, name, ns string) (*unstructured.Unstructured, error)
GetRelease implements HelmGetter interface
type DeploymentSubroutine ¶
type DeploymentSubroutine struct {
// contains filtered or unexported fields
}
func NewDeploymentSubroutine ¶
func NewDeploymentSubroutine(client client.Client, cfg *pmconfig.CommonServiceConfig, operatorCfg *config.OperatorConfig) *DeploymentSubroutine
func (*DeploymentSubroutine) ApplyManifestFromFileWithMergedValues ¶
func (*DeploymentSubroutine) ApplyReleaseWithValues ¶
func (s *DeploymentSubroutine) ApplyReleaseWithValues(ctx context.Context, path string, k8sClient client.Client, values apiextensionsv1.JSON) error
func (*DeploymentSubroutine) Finalize ¶
func (r *DeploymentSubroutine) Finalize(_ context.Context, _ runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
func (*DeploymentSubroutine) Finalizers ¶
func (r *DeploymentSubroutine) Finalizers() []string
func (*DeploymentSubroutine) GetName ¶
func (r *DeploymentSubroutine) GetName() string
func (*DeploymentSubroutine) Process ¶
func (r *DeploymentSubroutine) Process(ctx context.Context, runtimeObj runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
type HelmGetter ¶
type HelmGetter interface {
GetRelease(ctx context.Context, client client.Client, name, ns string) (*unstructured.Unstructured, error)
}
HelmGetter is an interface for getting Helm releases
type KcpsetupSubroutine ¶
type KcpsetupSubroutine struct {
// contains filtered or unexported fields
}
func NewKcpsetupSubroutine ¶
func (*KcpsetupSubroutine) ApplyDirStructure ¶
func (r *KcpsetupSubroutine) ApplyDirStructure( ctx context.Context, dir string, kcpPath string, config *rest.Config, inventory map[string]string, inst *corev1alpha1.PlatformMesh, ) error
func (*KcpsetupSubroutine) ApplyManifestFromFile ¶
func (r *KcpsetupSubroutine) ApplyManifestFromFile( ctx context.Context, path string, k8sClient client.Client, templateData map[string]string, wsPath string, inst *corev1alpha1.PlatformMesh, ) error
func (*KcpsetupSubroutine) CreateKcpResources ¶
func (r *KcpsetupSubroutine) CreateKcpResources(ctx context.Context, config *rest.Config, dir string, inst *corev1alpha1.PlatformMesh) error
func (*KcpsetupSubroutine) Finalize ¶
func (r *KcpsetupSubroutine) Finalize( ctx context.Context, runtimeObj runtimeobject.RuntimeObject, ) (ctrl.Result, errors.OperatorError)
func (*KcpsetupSubroutine) Finalizers ¶
func (r *KcpsetupSubroutine) Finalizers() []string
func (*KcpsetupSubroutine) GetAPIExportHashInventory ¶
func (*KcpsetupSubroutine) GetCABundleInventory ¶
func (*KcpsetupSubroutine) GetCaBundle ¶
func (r *KcpsetupSubroutine) GetCaBundle(ctx context.Context, webhookConfig *corev1alpha1.WebhookConfiguration) ([]byte, error)
func (*KcpsetupSubroutine) GetName ¶
func (r *KcpsetupSubroutine) GetName() string
func (*KcpsetupSubroutine) Process ¶
func (r *KcpsetupSubroutine) Process(ctx context.Context, runtimeObj runtimeobject.RuntimeObject) (ctrl.Result, errors.OperatorError)
func (*KcpsetupSubroutine) UnstructuredFromFile ¶
func (s *KcpsetupSubroutine) UnstructuredFromFile(path string, templateData map[string]string, log *logger.Logger) (unstructured.Unstructured, error)
type ProvidersecretSubroutine ¶
type ProvidersecretSubroutine struct {
// contains filtered or unexported fields
}
func NewProviderSecretSubroutine ¶
func NewProviderSecretSubroutine( client client.Client, helper KcpHelper, helm HelmGetter, kcpUrl string, ) *ProvidersecretSubroutine
func (*ProvidersecretSubroutine) Finalize ¶
func (r *ProvidersecretSubroutine) Finalize( ctx context.Context, runtimeObj runtimeobject.RuntimeObject, ) (ctrl.Result, errors.OperatorError)
func (*ProvidersecretSubroutine) Finalizers ¶
func (r *ProvidersecretSubroutine) Finalizers() []string
func (*ProvidersecretSubroutine) GetName ¶
func (r *ProvidersecretSubroutine) GetName() string
func (*ProvidersecretSubroutine) HandleInitializerConnection ¶
func (r *ProvidersecretSubroutine) HandleInitializerConnection( ctx context.Context, instance *corev1alpha1.PlatformMesh, ic corev1alpha1.InitializerConnection, restCfg *rest.Config, ) (ctrl.Result, errors.OperatorError)
func (*ProvidersecretSubroutine) HandleProviderConnection ¶
func (r *ProvidersecretSubroutine) HandleProviderConnection( ctx context.Context, instance *corev1alpha1.PlatformMesh, pc corev1alpha1.ProviderConnection, cfg *rest.Config, ) (ctrl.Result, errors.OperatorError)
func (*ProvidersecretSubroutine) Process ¶
func (r *ProvidersecretSubroutine) Process( ctx context.Context, runtimeObj runtimeobject.RuntimeObject, ) (ctrl.Result, errors.OperatorError)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.