Documentation ¶
Index ¶
Constants ¶
View Source
const ( ApplicationSecretName = "eventing-webhook-auth" ApplicationSecretNamespace = "kyma-system" KcpNamespace = "kcp-system" )
Variables ¶
View Source
var NewClient = func(k8sClient kpkgclient.Client, skrClusterID string) (Client, error) { kubeconfigSecretName := fmt.Sprintf("kubeconfig-%s", skrClusterID) secret := &kcorev1.Secret{} if err := k8sClient.Get(context.Background(), types.NamespacedName{Name: kubeconfigSecretName, Namespace: KcpNamespace}, secret); err != nil { return nil, err } kubeconfig := secret.Data["config"] if len(kubeconfig) == 0 { return nil, errors.Errorf("failed to find SKR cluster kubeconfig in secret %s", kubeconfigSecretName) } config, err := clientcmd.RESTConfigFromKubeConfig(kubeconfig) if err != nil { return nil, err } c, err := kpkgclient.New(config, kpkgclient.Options{}) if err != nil { return nil, err } return &client{k8sClient: c}, nil }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.