Documentation ¶
Index ¶
- func BuildCoordinatorInformerFactory(kubeClient kubernetes.Interface) informers.SharedInformerFactory
- func BuildRSSWithDefaultValue() *unifflev1alpha1.RemoteShuffleService
- func BuildShuffleServerInformerFactory(kubeClient kubernetes.Interface) informers.SharedInformerFactory
- func BuildShuffleServerKey(pod *corev1.Pod) string
- func ConvertShuffleServerKeysToNodes(keys sets.String) sets.String
- func GenerateCoordinatorName(rss *unifflev1alpha1.RemoteShuffleService) string
- func GenerateShuffleServerLabels(rss *unifflev1alpha1.RemoteShuffleService) map[string]string
- func GenerateShuffleServerName(rss *unifflev1alpha1.RemoteShuffleService) string
- func GetCurrentNamespace() string
- func GetExcludeNodesConfigMapKey(rss *unifflev1alpha1.RemoteShuffleService) string
- func GetExcludeNodesMountPath(rss *unifflev1alpha1.RemoteShuffleService) string
- func GetMetricsServerPort(pod *corev1.Pod) string
- func GetRevisionFromPod(pod *corev1.Pod) string
- func GetRssNameByPod(pod *corev1.Pod) string
- func GetShuffleServerNode(pod *corev1.Pod) string
- func GetShuffleServerPort(pod *corev1.Pod) string
- func GetSortedList(values sets.String) []string
- func ParseShuffleServerKey(key string) (revision, podName, node string)
- func SetUpCaCert(commonName string, pemCAKey []byte) ([]byte, error)
- func SetUpCaKey() ([]byte, error)
- func SetUpSignedCertAndKey(domains []string, ips []net.IP, commonName string, pemCAKey, pemCACert []byte, ...) ([]byte, []byte, error)
- func SetupServerCert(domain, commonName string) ([]byte, []byte, []byte, error)
- func UniqueName(object metav1.Object) string
- func UpdateSecret(kubeClient kubernetes.Interface, namespace, secretName string, ...) error
- type GenericConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCoordinatorInformerFactory ¶
func BuildCoordinatorInformerFactory(kubeClient kubernetes.Interface) informers.SharedInformerFactory
BuildCoordinatorInformerFactory builds informer factory for objects related to coordinators.
func BuildRSSWithDefaultValue ¶
func BuildRSSWithDefaultValue() *unifflev1alpha1.RemoteShuffleService
BuildRSSWithDefaultValue builds a rss object with required or default values for testing.
func BuildShuffleServerInformerFactory ¶
func BuildShuffleServerInformerFactory(kubeClient kubernetes.Interface) informers.SharedInformerFactory
BuildShuffleServerInformerFactory builds an informer factory for shuffle servers.
func BuildShuffleServerKey ¶
BuildShuffleServerKey returns shuffler server key used in rss object's status.
func ConvertShuffleServerKeysToNodes ¶
ConvertShuffleServerKeysToNodes converts shuffle server keys to nodes.
func GenerateCoordinatorName ¶
func GenerateCoordinatorName(rss *unifflev1alpha1.RemoteShuffleService) string
GenerateCoordinatorName returns service account or configMap name of coordinators.
func GenerateShuffleServerLabels ¶
func GenerateShuffleServerLabels(rss *unifflev1alpha1.RemoteShuffleService) map[string]string
GenerateShuffleServerLabels returns labels used by statefulSets or pods of shuffle servers.
func GenerateShuffleServerName ¶
func GenerateShuffleServerName(rss *unifflev1alpha1.RemoteShuffleService) string
GenerateShuffleServerName returns workload or nodePort service name of shuffle servers.
func GetCurrentNamespace ¶
func GetCurrentNamespace() string
GetCurrentNamespace returns current namespace.
func GetExcludeNodesConfigMapKey ¶
func GetExcludeNodesConfigMapKey(rss *unifflev1alpha1.RemoteShuffleService) string
GetExcludeNodesConfigMapKey returns configMap key of excluded nodes.
func GetExcludeNodesMountPath ¶
func GetExcludeNodesMountPath(rss *unifflev1alpha1.RemoteShuffleService) string
GetExcludeNodesMountPath returns excluded nodes file's directory which is used as configMap volume mouth path.
func GetMetricsServerPort ¶
GetMetricsServerPort returns metrics server port by pod.
func GetRevisionFromPod ¶
GetRevisionFromPod returns revision of the pod belongs to a statefulSet.
func GetRssNameByPod ¶
GetRssNameByPod returns rss object name from a pod.
func GetShuffleServerNode ¶
GetShuffleServerNode returns shuffle server node name by pod.
func GetShuffleServerPort ¶
GetShuffleServerPort returns shuffle server port by pod.
func GetSortedList ¶
GetSortedList returns sorted slice.
func ParseShuffleServerKey ¶
ParseShuffleServerKey parses shuffler server key used in rss object's status.
func SetUpCaCert ¶
SetUpCaCert sets up a new ca certification.
func SetUpSignedCertAndKey ¶
func SetUpSignedCertAndKey(domains []string, ips []net.IP, commonName string, pemCAKey, pemCACert []byte, usage []x509.ExtKeyUsage) ( []byte, []byte, error)
SetUpSignedCertAndKey uses the ca certificate and ca private key to generate certificates.
func SetupServerCert ¶
SetupServerCert sets up the server certificate and private key.
func UniqueName ¶
UniqueName returns unique name of an object.
func UpdateSecret ¶
func UpdateSecret(kubeClient kubernetes.Interface, namespace, secretName string, updateFunc func(secret *corev1.Secret)) error
UpdateSecret updates Secret and retries when conflicts are encountered.
Types ¶
type GenericConfig ¶
type GenericConfig struct { KubeConfig string RESTConfig *rest.Config KubeClient kubernetes.Interface RSSClient versioned.Interface RunCtx context.Context }
GenericConfig stores the basic configuration of admission webhook server.
func (*GenericConfig) AddFlags ¶
func (c *GenericConfig) AddFlags()
AddFlags adds all configurations to the global flags.
func (*GenericConfig) Complete ¶
func (c *GenericConfig) Complete()
Complete is called before the component runs.