Documentation ¶
Overview ¶
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- func BuildOwnerReference(cluster *rapi.SubmarineCluster) metav1.OwnerReference
- func CreateSubmarineClusterLabelSelector(submarineCluster *sapi.SubmarineCluster) (labels.Selector, error)
- func GenerateMD5Spec(spec *kapiv1.PodSpec) (string, error)
- func GetAnnotationsSet(submarineCluster *sapi.SubmarineCluster) (labels.Set, error)
- func GetLabelsSet(submarineCluster *sapi.SubmarineCluster) (labels.Set, error)
- type SubmarineClusterControl
- func (p *SubmarineClusterControl) CreatePod(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Pod, error)
- func (p *SubmarineClusterControl) DeletePod(submarineCluster *rapi.SubmarineCluster, podName string) error
- func (p *SubmarineClusterControl) DeletePodNow(submarineCluster *rapi.SubmarineCluster, podName string) error
- func (p *SubmarineClusterControl) GetSubmarineClusterPods(submarineCluster *rapi.SubmarineCluster) ([]*kapiv1.Pod, error)
- type SubmarineClusterControlInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOwnerReference ¶
func BuildOwnerReference(cluster *rapi.SubmarineCluster) metav1.OwnerReference
BuildOwnerReference used to build the OwnerReference from a SubmarineCluster
func CreateSubmarineClusterLabelSelector ¶
func CreateSubmarineClusterLabelSelector(submarineCluster *sapi.SubmarineCluster) (labels.Selector, error)
CreateSubmarineClusterLabelSelector creates label selector to select the jobs related to a submarineCluster, stepName
func GenerateMD5Spec ¶
GenerateMD5Spec used to generate the PodSpec MD5 hash
func GetAnnotationsSet ¶
func GetAnnotationsSet(submarineCluster *sapi.SubmarineCluster) (labels.Set, error)
GetAnnotationsSet return a labels.Set of annotation from the SubmarineCluster
func GetLabelsSet ¶
func GetLabelsSet(submarineCluster *sapi.SubmarineCluster) (labels.Set, error)
GetLabelsSet return labels associated to the submarine-node pods
Types ¶
type SubmarineClusterControl ¶
type SubmarineClusterControl struct { PodLister corev1listers.PodLister KubeClient clientset.Interface Recorder record.EventRecorder }
SubmarineClusterControl contains requires accessor to managing the SubmarineCluster pods
func NewSubmarineClusterControl ¶
func NewSubmarineClusterControl(lister corev1listers.PodLister, client clientset.Interface, rec record.EventRecorder) *SubmarineClusterControl
NewSubmarineClusterControl builds and returns new NewSubmarineClusterControl instance
func (*SubmarineClusterControl) CreatePod ¶
func (p *SubmarineClusterControl) CreatePod(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Pod, error)
CreatePod used to create a Pod from the SubmarineCluster pod template
func (*SubmarineClusterControl) DeletePod ¶
func (p *SubmarineClusterControl) DeletePod(submarineCluster *rapi.SubmarineCluster, podName string) error
DeletePod used to delete a pod from its name
func (*SubmarineClusterControl) DeletePodNow ¶
func (p *SubmarineClusterControl) DeletePodNow(submarineCluster *rapi.SubmarineCluster, podName string) error
DeletePodNow used to delete now (force) a pod from its name
func (*SubmarineClusterControl) GetSubmarineClusterPods ¶
func (p *SubmarineClusterControl) GetSubmarineClusterPods(submarineCluster *rapi.SubmarineCluster) ([]*kapiv1.Pod, error)
GetSubmarineClusterPods return list of Pod attached to a SubmarineCluster
type SubmarineClusterControlInterface ¶
type SubmarineClusterControlInterface interface { // GetSubmarineClusterPods return list of Pod attached to a SubmarineCluster GetSubmarineClusterPods(submarineCluster *rapi.SubmarineCluster) ([]*kapiv1.Pod, error) // CreatePod used to create a Pod from the SubmarineCluster pod template CreatePod(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Pod, error) // DeletePod used to delete a pod from its name DeletePod(submarineCluster *rapi.SubmarineCluster, podName string) error // DeletePodNow used to delete now (force) a pod from its name DeletePodNow(submarineCluster *rapi.SubmarineCluster, podName string) error }
SubmarineClusterControlInterface interface for the SubmarineClusterPodControl