-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crd, option: Make CiliumNodeConfig available on v2 API
This commit intens to turn CiliumNodeConfig feature to Limited. The CRD is now available in v2 and v2alpha1 API versions. The depreciation of v2alpha1 should be done in another commit. The yaml definition of `CiliumNodeConfig` is in `v2` directory but hold the two versions. Signed-off-by: Donia Chaiehloudj <donia.cld@isovalent.com>
- Loading branch information
Showing
23 changed files
with
1,162 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright Authors of Cilium | ||
|
||
package v2 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
//+genclient | ||
//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
//+kubebuilder:resource:categories={cilium} | ||
//+kubebuilder:object:root=true | ||
//+deepequal-gen=false | ||
//+kubebuilder:storageversion | ||
|
||
// CiliumNodeConfig is a list of configuration key-value pairs. It is applied to | ||
// nodes indicated by a label selector. | ||
// | ||
// If multiple overrides apply to the same node, they will be ordered by name | ||
// with later Overrides overwriting any conflicting keys. | ||
type CiliumNodeConfig struct { | ||
// +deepequal-gen=false | ||
metav1.TypeMeta `json:",inline"` | ||
// +deepequal-gen=false | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
// Spec is the desired Cilium configuration overrides for a given node | ||
Spec CiliumNodeConfigSpec `json:"spec"` | ||
} | ||
|
||
// +deepequal-gen=false | ||
type CiliumNodeConfigSpec struct { | ||
// Defaults is treated the same as the cilium-config ConfigMap - a set | ||
// of key-value pairs parsed by the agent and operator processes. | ||
// Each key must be a valid config-map data field (i.e. a-z, A-Z, -, _, and .) | ||
Defaults map[string]string `json:"defaults"` | ||
|
||
// NodeSelector is a label selector that determines to which nodes | ||
// this configuration applies. | ||
// If not supplied, then this config applies to no nodes. If | ||
// empty, then it applies to all nodes. | ||
NodeSelector *metav1.LabelSelector `json:"nodeSelector"` | ||
} | ||
|
||
//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
//+deepequal-gen=false | ||
|
||
type CiliumNodeConfigList struct { | ||
// +deepequal-gen=false | ||
metav1.TypeMeta `json:",inline"` | ||
// +deepequal-gen=false | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []CiliumNodeConfig `json:"items"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.