Documentation ¶
Index ¶
- Constants
- func CipherSuites(securityProfile *configv1.TLSSecurityProfile) []string
- func ControllerOwnerRef(obj client.Object) *metav1.OwnerReference
- func FeatureGates(fg *configv1.FeatureGateSelection) []string
- func IngressSubdomain(hcp *hyperv1.HostedControlPlane) string
- func MinTLSVersion(securityProfile *configv1.TLSSecurityProfile) string
- func OpenSSLToIANACipherSuites(ciphers []string) []string
- func SerializeAuditPolicy(policy *auditv1.Policy) ([]byte, error)
- func ValidateGlobalConfig(ctx context.Context, hcp *hyperv1.HostedControlPlane) error
- type AdditionalAnnotations
- type AdditionalLabels
- type DeploymentConfig
- func (c *DeploymentConfig) ApplyTo(deployment *appsv1.Deployment)
- func (c *DeploymentConfig) ApplyToDaemonSet(daemonset *appsv1.DaemonSet)
- func (c *DeploymentConfig) SetColocation(hcp *hyperv1.HostedControlPlane)
- func (c *DeploymentConfig) SetColocationAnchor(hcp *hyperv1.HostedControlPlane)
- func (c *DeploymentConfig) SetControlPlaneIsolation(hcp *hyperv1.HostedControlPlane)
- func (c *DeploymentConfig) SetMultizoneSpread(labels map[string]string)
- func (c *DeploymentConfig) SetRestartAnnotation(objectMetadata metav1.ObjectMeta)
- type GlobalConfig
- type LivenessProbes
- type OwnerRef
- type ReadinessProbes
- type ResourcesSpec
- type Scheduling
- type SecurityContextSpec
Constants ¶
View Source
const ( // APICriticalPriorityClass is for pods that are required for API calls and // resource admission to succeed. This includes pods like kube-apiserver, // aggregated API servers, and webhooks. APICriticalPriorityClass = "hypershift-api-critical" // DefaultPriorityClass is for pods in the Hypershift control plane that are // not API critical but still need elevated priority. DefaultPriorityClass = "hypershift-control-plane" DefaultServiceAccountIssuer = "https://kubernetes.default.svc" DefaultImageRegistryHostname = "image-registry.openshift-image-registry.svc:5000" DefaultAdvertiseAddress = "172.20.0.1" DefaultEtcdURL = "https://etcd-client:2379" DefaultAPIServerPort = 6443 DefaultEtcdClusterVersion = "3.4.9" DefaultServiceNodePortRange = "30000-32767" )
Variables ¶
This section is empty.
Functions ¶
func CipherSuites ¶
func CipherSuites(securityProfile *configv1.TLSSecurityProfile) []string
func ControllerOwnerRef ¶
func ControllerOwnerRef(obj client.Object) *metav1.OwnerReference
func FeatureGates ¶
func FeatureGates(fg *configv1.FeatureGateSelection) []string
func IngressSubdomain ¶
func IngressSubdomain(hcp *hyperv1.HostedControlPlane) string
func MinTLSVersion ¶
func MinTLSVersion(securityProfile *configv1.TLSSecurityProfile) string
func OpenSSLToIANACipherSuites ¶
OpenSSLToIANACipherSuites maps input OpenSSL Cipher Suite names to their IANA counterparts. Unknown ciphers are left out.
func ValidateGlobalConfig ¶
func ValidateGlobalConfig(ctx context.Context, hcp *hyperv1.HostedControlPlane) error
Types ¶
type AdditionalAnnotations ¶
func (AdditionalAnnotations) ApplyTo ¶
func (l AdditionalAnnotations) ApplyTo(podMeta *metav1.ObjectMeta)
type AdditionalLabels ¶
func (AdditionalLabels) ApplyTo ¶
func (l AdditionalLabels) ApplyTo(podMeta *metav1.ObjectMeta)
type DeploymentConfig ¶
type DeploymentConfig struct { Replicas int `json:"replicas"` Scheduling Scheduling `json:"scheduling"` AdditionalLabels AdditionalLabels `json:"additionalLabels"` AdditionalAnnotations AdditionalAnnotations `json:"additionalAnnotations"` SecurityContexts SecurityContextSpec `json:"securityContexts"` LivenessProbes LivenessProbes `json:"livenessProbes"` ReadinessProbes ReadinessProbes `json:"readinessProbes"` Resources ResourcesSpec `json:"resources"` }
func (*DeploymentConfig) ApplyTo ¶
func (c *DeploymentConfig) ApplyTo(deployment *appsv1.Deployment)
func (*DeploymentConfig) ApplyToDaemonSet ¶
func (c *DeploymentConfig) ApplyToDaemonSet(daemonset *appsv1.DaemonSet)
func (*DeploymentConfig) SetColocation ¶
func (c *DeploymentConfig) SetColocation(hcp *hyperv1.HostedControlPlane)
SetColocation sets labels and affinity rules for this deployment so that pods of the deployment will prefer to group with pods of the anchor deployment as established by SetColocationAnchor.
func (*DeploymentConfig) SetColocationAnchor ¶
func (c *DeploymentConfig) SetColocationAnchor(hcp *hyperv1.HostedControlPlane)
SetColocationAnchor sets labels on the deployment to establish pods of this deployment as an anchor for other pods associated with hcp using pod affinity.
func (*DeploymentConfig) SetControlPlaneIsolation ¶
func (c *DeploymentConfig) SetControlPlaneIsolation(hcp *hyperv1.HostedControlPlane)
func (*DeploymentConfig) SetMultizoneSpread ¶
func (c *DeploymentConfig) SetMultizoneSpread(labels map[string]string)
func (*DeploymentConfig) SetRestartAnnotation ¶
func (c *DeploymentConfig) SetRestartAnnotation(objectMetadata metav1.ObjectMeta)
type GlobalConfig ¶
type GlobalConfig struct { APIServer *configv1.APIServer Authentication *configv1.Authentication FeatureGate *configv1.FeatureGate Image *configv1.Image Ingress *configv1.Ingress Network *configv1.Network OAuth *configv1.OAuth Scheduler *configv1.Scheduler }
func ParseGlobalConfig ¶
func ParseGlobalConfig(ctx context.Context, cfg *hyperv1.ClusterConfiguration) (GlobalConfig, error)
type LivenessProbes ¶
func (LivenessProbes) ApplyTo ¶
func (p LivenessProbes) ApplyTo(podSpec *corev1.PodSpec)
func (LivenessProbes) ApplyToContainer ¶
func (p LivenessProbes) ApplyToContainer(container string, c *corev1.Container)
type ReadinessProbes ¶
func (ReadinessProbes) ApplyTo ¶
func (p ReadinessProbes) ApplyTo(podSpec *corev1.PodSpec)
func (ReadinessProbes) ApplyToContainer ¶
func (p ReadinessProbes) ApplyToContainer(container string, c *corev1.Container)
type ResourcesSpec ¶
type ResourcesSpec map[string]corev1.ResourceRequirements
func (ResourcesSpec) ApplyTo ¶
func (s ResourcesSpec) ApplyTo(podSpec *corev1.PodSpec)
type Scheduling ¶
type Scheduling struct { Affinity *corev1.Affinity `json:"affinity,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` PriorityClass string `json:"priorityClass"` }
func (*Scheduling) ApplyTo ¶
func (s *Scheduling) ApplyTo(podSpec *corev1.PodSpec)
type SecurityContextSpec ¶
type SecurityContextSpec map[string]corev1.SecurityContext
func (SecurityContextSpec) ApplyTo ¶
func (s SecurityContextSpec) ApplyTo(podSpec *corev1.PodSpec)
func (SecurityContextSpec) ApplyToContainer ¶
func (s SecurityContextSpec) ApplyToContainer(name string, c *corev1.Container)
Click to show internal directories.
Click to hide internal directories.