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.
* 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.
* 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.
* 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 IsPodReady(pod *apiv1.Pod) (bool, error)
- func NewSubmarineAdmin(pods []*apiv1.Pod, cfg *config.Submarine) (submarine.AdminInterface, error)
- type Config
- type Controller
- type PodDisruptionBudgetsControl
- func (s *PodDisruptionBudgetsControl) CreateSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) (*policyv1.PodDisruptionBudget, error)
- func (s *PodDisruptionBudgetsControl) DeleteSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) error
- func (s *PodDisruptionBudgetsControl) GetSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) (*policyv1.PodDisruptionBudget, error)
- type PodDisruptionBudgetsControlInterface
- type ServicesControl
- func (s *ServicesControl) CreateSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Service, error)
- func (s *ServicesControl) DeleteSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) error
- func (s *ServicesControl) GetSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Service, error)
- type ServicesControlInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPodReady ¶
IsPodReady check if pod is in ready condition, return the error message otherwise
func NewSubmarineAdmin ¶
NewSubmarineAdmin builds and returns new submarine.Admin from the list of pods
Types ¶
type Config ¶
type Config struct {
NbWorker int
// contains filtered or unexported fields
}
Config contains the Controller settings
type Controller ¶
type Controller struct {
SubmarineClusterSynced cache.InformerSynced
PodSynced cache.InformerSynced
ServiceSynced cache.InformerSynced
PodDiscruptionBudgetSynced cache.InformerSynced
// contains filtered or unexported fields
}
Controller contains all controller fields
func NewController ¶
func NewController(cfg *Config, kubeClient clientset.Interface, submarineClient sClient.Interface, kubeInformer kubeinformers.SharedInformerFactory, rInformer sInformers.SharedInformerFactory) *Controller
NewController builds and return new controller instance
func (*Controller) Run ¶
func (c *Controller) Run(stop <-chan struct{}) error
Run executes the Controller
type PodDisruptionBudgetsControl ¶
type PodDisruptionBudgetsControl struct {
KubeClient clientset.Interface
Recorder record.EventRecorder
}
PodDisruptionBudgetsControl contains all information for managing Kube PodDisruptionBudgets
func NewPodDisruptionBudgetsControl ¶
func NewPodDisruptionBudgetsControl(client clientset.Interface, rec record.EventRecorder) *PodDisruptionBudgetsControl
NewPodDisruptionBudgetsControl builds and returns new PodDisruptionBudgetsControl instance
func (*PodDisruptionBudgetsControl) CreateSubmarineClusterPodDisruptionBudget ¶
func (s *PodDisruptionBudgetsControl) CreateSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) (*policyv1.PodDisruptionBudget, error)
CreateSubmarineClusterPodDisruptionBudget used to create the Kubernetes PodDisruptionBudget needed to access the Submarine Cluster
func (*PodDisruptionBudgetsControl) DeleteSubmarineClusterPodDisruptionBudget ¶
func (s *PodDisruptionBudgetsControl) DeleteSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) error
DeleteSubmarineClusterPodDisruptionBudget used to delete the Kubernetes PodDisruptionBudget linked to the Submarine Cluster
func (*PodDisruptionBudgetsControl) GetSubmarineClusterPodDisruptionBudget ¶
func (s *PodDisruptionBudgetsControl) GetSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) (*policyv1.PodDisruptionBudget, error)
GetSubmarineClusterPodDisruptionBudget used to retrieve the Kubernetes PodDisruptionBudget associated to the SubmarineCluster
type PodDisruptionBudgetsControlInterface ¶
type PodDisruptionBudgetsControlInterface interface {
// CreateSubmarineClusterPodDisruptionBudget used to create the Kubernetes PodDisruptionBudget needed to access the Submarine Cluster
CreateSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) (*policyv1.PodDisruptionBudget, error)
// DeleteSubmarineClusterPodDisruptionBudget used to delete the Kubernetes PodDisruptionBudget linked to the Submarine Cluster
DeleteSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) error
// GetSubmarineClusterPodDisruptionBudget used to retrieve the Kubernetes PodDisruptionBudget associated to the SubmarineCluster
GetSubmarineClusterPodDisruptionBudget(submarineCluster *rapi.SubmarineCluster) (*policyv1.PodDisruptionBudget, error)
}
PodDisruptionBudgetsControlInterface interface for the PodDisruptionBudgetsControl
type ServicesControl ¶
type ServicesControl struct {
KubeClient clientset.Interface
Recorder record.EventRecorder
}
ServicesControl contains all information for managing Kube Services
func NewServicesControl ¶
func NewServicesControl(client clientset.Interface, rec record.EventRecorder) *ServicesControl
NewServicesControl builds and returns new ServicesControl instance
func (*ServicesControl) CreateSubmarineClusterService ¶
func (s *ServicesControl) CreateSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Service, error)
CreateSubmarineClusterService used to create the Kubernetes Service needed to access the Submarine Cluster
func (*ServicesControl) DeleteSubmarineClusterService ¶
func (s *ServicesControl) DeleteSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) error
DeleteSubmarineClusterService used to delete the Kubernetes Service linked to the Submarine Cluster
func (*ServicesControl) GetSubmarineClusterService ¶
func (s *ServicesControl) GetSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Service, error)
GetSubmarineClusterService used to retrieve the Kubernetes Service associated to the SubmarineCluster
type ServicesControlInterface ¶
type ServicesControlInterface interface {
// CreateSubmarineClusterService used to create the Kubernetes Service needed to access the Submarine Cluster
CreateSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Service, error)
// DeleteSubmarineClusterService used to delete the Kubernetes Service linked to the Submarine Cluster
DeleteSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) error
// GetSubmarineClusterService used to retrieve the Kubernetes Service associated to the SubmarineCluster
GetSubmarineClusterService(submarineCluster *rapi.SubmarineCluster) (*kapiv1.Service, error)
}
ServicesControlInterface interface for the ServicesControl
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |