clusterops

package
v0.17.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Organization      = "kubean.io"
	DefaultEffectTime = 10 * 365 * 24 * time.Hour
	CAStoreSecret     = "webhook-http-ca-secret"

	WebHookPath             = "/webhook"
	WebhookSVCNamespace, _  = os.LookupEnv("WEBHOOK_SERVICE_NAMESPACE")
	WebhookSVCName, _       = os.LookupEnv("WEBHOOK_SERVICE_NAME")
	ClusterOperationWebhook = "kubean-admission-webhook"
	FailurePolicy, _        = os.LookupEnv("WEBHOOK_FAILURE_POLICY")
)

Functions

func CreateHTTPSCAFilesFromSecret

func CreateHTTPSCAFilesFromSecret(secret *corev1.Secret) error

func CreateHTTPSCASecretWithLock

func CreateHTTPSCASecretWithLock(ctx context.Context, client kubernetes.Interface) error

func EnsureCASecretExist

func EnsureCASecretExist(client kubernetes.Interface, createHTTPSCAInSecret func() (*corev1.Secret, error)) error

func PrepareWebHookHTTPSServer

func PrepareWebHookHTTPSServer(KubeanClusterOpsSet clusterOperationClientSet.Interface) *http.Server

func StartWebHookHTTPSServer

func StartWebHookHTTPSServer(server *http.Server) error

func UpdateClusterOperationWebhook

func UpdateClusterOperationWebhook(clientSet kubernetes.Interface) error

func WaitForCASecretExist

func WaitForCASecretExist(client kubernetes.Interface) *corev1.Secret

Types

type AdmissionReviewHandler

type AdmissionReviewHandler struct {
	KubeanClusterOpsSet clusterOperationClientSet.Interface
}

func (AdmissionReviewHandler) ServeHTTP

func (handler AdmissionReviewHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type PingHandler

type PingHandler struct{}

func (PingHandler) ServeHTTP

func (p PingHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL