d2k

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppLabel is the value of the `app` label applied to every d2k resource.
	AppLabel = "d2k"

	// DeploymentName is the name of the d2k Deployment, ServiceAccount, Role,
	// RoleBinding, Service, and TLS Secret in the target namespace.
	DeploymentName = "d2k"

	// ServiceAccountName is the name of the d2k ServiceAccount.
	ServiceAccountName = "d2k"

	// RoleName is the name of the namespace-scoped Role granting d2k workload
	// management permissions.
	RoleName = "d2k"

	// RoleBindingName is the name of the namespace-scoped RoleBinding tying
	// the Role to the ServiceAccount.
	RoleBindingName = "d2k"

	// NodeReaderClusterRoleName is the cluster-scoped ClusterRole granting
	// read-only access to nodes and storageclasses.
	NodeReaderClusterRoleName = "d2k-node-reader"

	// NodeReaderClusterRoleBindingName binds NodeReaderClusterRoleName to the
	// d2k ServiceAccount.
	NodeReaderClusterRoleBindingName = "d2k-node-reader"

	// TLSSecretName is the name of the kubernetes.io/tls Secret holding the
	// d2k server certificate and key. The d2k Deployment mounts this Secret
	// at /etc/d2k/tls and switches to TLS on port 2376 when present.
	TLSSecretName = "d2k-tls"

	// ServiceName is the name of the LoadBalancer Service exposing the d2k
	// Docker-compatible API endpoint on port 2376.
	ServiceName = "d2k"
)

Variables

This section is empty.

Functions

func Deploy

func Deploy(adminKubeconfig string, cfg Config) error

Deploy reconciles all d2k Kubernetes objects programmatically. The function is idempotent: repeated invocations against an existing deployment update in place rather than failing.

Types

type Config

type Config struct {
	// Namespace is the target namespace into which all d2k resources are
	// reconciled and against which d2k translates Docker API calls.
	Namespace string

	// Image is the fully-qualified d2k container image reference.
	Image string

	// Certs holds the on-disk paths to the kubesolo-CA-signed TLS material.
	Certs types.D2KCertificatePaths
}

Config carries the inputs that vary per kubesolo invocation.

Jump to

Keyboard shortcuts

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