Documentation ¶
Overview ¶
Copyright 2022 The Kubernetes Authors.
Licensed 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 ¶
- Constants
- Variables
- type NFD
- type NodeFeatureDiscoveryReconciler
- type ResourceStatus
- func ClusterRole(n NFD) (ResourceStatus, error)
- func ClusterRoleBinding(n NFD) (ResourceStatus, error)
- func ConfigMap(n NFD) (ResourceStatus, error)
- func DaemonSet(n NFD) (ResourceStatus, error)
- func Deployment(n NFD) (ResourceStatus, error)
- func Role(n NFD) (ResourceStatus, error)
- func RoleBinding(n NFD) (ResourceStatus, error)
- func Service(n NFD) (ResourceStatus, error)
- func ServiceAccount(n NFD) (ResourceStatus, error)
- type Resources
- type Status
Constants ¶
const ( // ConditionAvailable indicates that the resources maintained by the operator, // is functional and available in the cluster. ConditionAvailable string = "Available" // ConditionProgressing indicates that the operator is actively making changes to the resources maintained by the // operator ConditionProgressing string = "Progressing" // ConditionDegraded indicates that the resources maintained by the operator are not functioning completely. // An example of a degraded state would be if not all pods in a deployment were running. // It may still be available, but it is degraded ConditionDegraded string = "Degraded" // ConditionUpgradeable indicates whether the resources maintained by the operator are in a state that is safe to upgrade. // When `False`, the resources maintained by the operator should not be upgraded and the // message field should contain a human readable description of what the administrator should do to // allow the operator to successfully update the resources maintained by the operator. ConditionUpgradeable string = "Upgradeable" )
Variables ¶
var ( RetryInterval = time.Second * 5 Timeout = time.Second * 30 )
Functions ¶
This section is empty.
Types ¶
type NFD ¶
type NFD struct {
// contains filtered or unexported fields
}
NFD holds the needed information to watch from the Controller.
type NodeFeatureDiscoveryReconciler ¶
type NodeFeatureDiscoveryReconciler struct { // Client interface to communicate with the API server. Reconciler needs this for // fetching objects. client.Client // Scheme is used by the kubebuilder library to set OwnerReferences. Every // controller needs this. Scheme *runtime.Scheme // Recorder defines interfaces for working with OCP event recorders. This // field is needed by the operator in order for the operator to write events. Recorder record.EventRecorder }
NodeFeatureDiscoveryReconciler reconciles a NodeFeatureDiscovery object
func (*NodeFeatureDiscoveryReconciler) Reconcile ¶
func (r *NodeFeatureDiscoveryReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*NodeFeatureDiscoveryReconciler) SetupWithManager ¶
func (r *NodeFeatureDiscoveryReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with a specified manager responsible for initializing shared dependencies (like caches and clients)
type ResourceStatus ¶
type ResourceStatus int
ResourceStatus defines the status of the resource as being Ready or NotReady
const ( Ready ResourceStatus = iota NotReady )
func ClusterRole ¶
func ClusterRole(n NFD) (ResourceStatus, error)
ClusterRole checks if the ClusterRole exists, and creates it if it doesn't
func ClusterRoleBinding ¶
func ClusterRoleBinding(n NFD) (ResourceStatus, error)
ClusterRoleBinding checks if a ClusterRoleBinding exists and creates one if it doesn't
func ConfigMap ¶
func ConfigMap(n NFD) (ResourceStatus, error)
ConfigMap checks if a ConfigMap exists and creates one if it doesn't
func DaemonSet ¶
func DaemonSet(n NFD) (ResourceStatus, error)
DaemonSet checks the readiness of a DaemonSet and creates one if it doesn't exist
func Deployment ¶ added in v0.4.2
func Deployment(n NFD) (ResourceStatus, error)
Deployment checks the readiness of a Deployment and creates one if it doesn't exist
func Role ¶
func Role(n NFD) (ResourceStatus, error)
Role checks if a Role exists and creates a Role if it doesn't
func RoleBinding ¶
func RoleBinding(n NFD) (ResourceStatus, error)
RoleBinding checks if a RoleBinding exists and creates a RoleBinding if it doesn't
func Service ¶
func Service(n NFD) (ResourceStatus, error)
Service checks if a Service exists and creates one if it doesn't exist
func ServiceAccount ¶
func ServiceAccount(n NFD) (ResourceStatus, error)
ServiceAccount checks the readiness of the NFD ServiceAccount and creates it if it doesn't exist
func (ResourceStatus) String ¶
func (s ResourceStatus) String() string
String implements the fmt.Stringer interface and returns describes ResourceStatus as a string.
type Resources ¶
type Resources struct { Namespace corev1.Namespace ServiceAccount corev1.ServiceAccount Role rbacv1.Role RoleBinding rbacv1.RoleBinding ClusterRole rbacv1.ClusterRole ClusterRoleBinding rbacv1.ClusterRoleBinding ConfigMap corev1.ConfigMap DaemonSet appsv1.DaemonSet Deployment appsv1.Deployment Pod corev1.Pod Service corev1.Service }
Resources holds objects owned by NFD