-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gregory Kopels
committed
Nov 20, 2024
1 parent
983ef91
commit 969f9dc
Showing
134 changed files
with
55,812 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- name: machineconfiguration | ||
sync: true | ||
repo_link: "https://github.com/openshift/api/" | ||
branch: master | ||
remote_api_directory: operator/v1 | ||
local_api_directory: schemes/machineconfiguration/mctypes | ||
... |
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,48 @@ | ||
package machineconfiguration | ||
|
||
import ( | ||
"github.com/golang/glog" | ||
"github.com/openshift-kni/eco-goinfra/pkg/clients" | ||
"github.com/openshift-kni/eco-goinfra/pkg/schemes/machineconfiguration/mctypes" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
runtimeClient "sigs.k8s.io/controller-runtime/pkg/client" | ||
) | ||
|
||
// Builder provides struct for a MachineConfiguration object. | ||
type Builder struct { | ||
Definition *mctypes.MachineConfiguration | ||
Object *mctypes.MachineConfiguration | ||
apiClient runtimeClient.Client | ||
} | ||
|
||
// NewBuilder creates a new instance of machineconfiguration. | ||
func NewBuilder() *Builder { | ||
return &Builder{ | ||
Definition: &mctypes.MachineConfiguration{}, | ||
} | ||
} | ||
|
||
// Pull pulls existing machineconfiguration from cluster. | ||
func Pull(apiClient *clients.Settings, name string) (b *Builder, err error) { | ||
glog.V(100).Infof("Pulling existing machineSet name %s ", name) | ||
|
||
err = apiClient.AttachScheme(mctypes.AddToScheme) | ||
if err != nil { | ||
glog.V(100).Infof("Failed to add machineconfiguration scheme to client schemes") | ||
|
||
return nil, err | ||
} | ||
|
||
builder := Builder{ | ||
apiClient: apiClient.Client, | ||
Definition: &mctypes.MachineConfiguration{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: name, | ||
}, | ||
}, | ||
} | ||
|
||
builder.Definition = builder.Object | ||
|
||
return &Builder{}, nil | ||
} |
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,3 @@ | ||
.PHONY: test | ||
test: | ||
make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="operator.openshift.io/v1" |
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,7 @@ | ||
// +k8s:deepcopy-gen=package,register | ||
// +k8s:defaulter-gen=TypeMeta | ||
// +k8s:openapi-gen=true | ||
|
||
// +kubebuilder:validation:Optional | ||
// +groupName=operator.openshift.io | ||
package mctypes |
34 changes: 34 additions & 0 deletions
34
...es/manual-override-crd-manifests/clustercsidrivers.operator.openshift.io/AAA_ungated.yaml
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,34 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
feature-gate.release.openshift.io/: "true" | ||
name: clustercsidrivers.operator.openshift.io | ||
spec: | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
properties: | ||
metadata: | ||
properties: | ||
name: | ||
enum: | ||
- ebs.csi.aws.com | ||
- efs.csi.aws.com | ||
- disk.csi.azure.com | ||
- file.csi.azure.com | ||
- filestore.csi.storage.gke.io | ||
- pd.csi.storage.gke.io | ||
- cinder.csi.openstack.org | ||
- csi.vsphere.vmware.com | ||
- manila.csi.openstack.org | ||
- csi.ovirt.org | ||
- csi.kubevirt.io | ||
- csi.sharedresource.openshift.io | ||
- diskplugin.csi.alibabacloud.com | ||
- vpc.block.csi.ibm.io | ||
- powervs.csi.ibm.com | ||
- secrets-store.csi.k8s.io | ||
- smb.csi.k8s.io | ||
type: string |
42 changes: 42 additions & 0 deletions
42
...ration/mctypes/manual-override-crd-manifests/dnses.operator.openshift.io/AAA_ungated.yaml
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,42 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
feature-gate.release.openshift.io/: "true" | ||
name: dnses.operator.openshift.io | ||
spec: | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
upstreamResolvers: | ||
default: {} | ||
properties: | ||
upstreams: | ||
items: | ||
anyOf: | ||
- not: | ||
required: | ||
- address | ||
- port | ||
properties: | ||
type: | ||
enum: | ||
- "" | ||
- SystemResolvConf | ||
- optional: | ||
- port | ||
properties: | ||
type: | ||
enum: | ||
- Network | ||
required: | ||
- address | ||
properties: | ||
address: | ||
anyOf: | ||
- format: ipv4 | ||
- format: ipv6 |
45 changes: 45 additions & 0 deletions
45
...s/manual-override-crd-manifests/ingresscontrollers.operator.openshift.io/AAA_ungated.yaml
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,45 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
feature-gate.release.openshift.io/: "true" | ||
name: ingresscontrollers.operator.openshift.io | ||
spec: | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
logging: | ||
properties: | ||
access: | ||
properties: | ||
destination: | ||
properties: | ||
syslog: | ||
oneOf: | ||
- properties: | ||
address: | ||
format: ipv4 | ||
- properties: | ||
address: | ||
format: ipv6 | ||
tuningOptions: | ||
anyOf: | ||
- properties: | ||
maxConnections: | ||
enum: | ||
- -1 | ||
- 0 | ||
- properties: | ||
maxConnections: | ||
format: int32 | ||
maximum: 2000000 | ||
minimum: 2000 | ||
subresources: | ||
scale: | ||
labelSelectorPath: .status.selector | ||
specReplicasPath: .spec.replicas | ||
statusReplicasPath: .status.availableReplicas |
14 changes: 14 additions & 0 deletions
14
...es/manual-override-crd-manifests/insightsoperators.operator.openshift.io/AAA_ungated.yaml
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,14 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
feature-gate.release.openshift.io/: "true" | ||
name: insightsoperators.operator.openshift.io | ||
spec: | ||
versions: | ||
- name: v1 | ||
subresources: | ||
scale: | ||
labelSelectorPath: .status.selector | ||
specReplicasPath: .spec.replicas | ||
statusReplicasPath: .status.availableReplicas |
16 changes: 16 additions & 0 deletions
16
...types/manual-override-crd-manifests/kubeapiservers.operator.openshift.io/AAA_ungated.yaml
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,16 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
feature-gate.release.openshift.io/: "true" | ||
name: kubeapiservers.operator.openshift.io | ||
spec: | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
managementState: | ||
pattern: ^(Managed|Force)$ |
16 changes: 16 additions & 0 deletions
16
...nual-override-crd-manifests/kubecontrollermanagers.operator.openshift.io/AAA_ungated.yaml
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,16 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
feature-gate.release.openshift.io/: "true" | ||
name: kubecontrollermanagers.operator.openshift.io | ||
spec: | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
managementState: | ||
pattern: ^(Managed|Force)$ |
16 changes: 16 additions & 0 deletions
16
...types/manual-override-crd-manifests/kubeschedulers.operator.openshift.io/AAA_ungated.yaml
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,16 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
feature-gate.release.openshift.io/: "true" | ||
name: kubeschedulers.operator.openshift.io | ||
spec: | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
properties: | ||
spec: | ||
properties: | ||
managementState: | ||
pattern: ^(Managed|Force)$ |
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,82 @@ | ||
package mctypes | ||
|
||
import ( | ||
configv1 "github.com/openshift/api/config/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
) | ||
|
||
var ( | ||
GroupName = "operator.openshift.io" | ||
GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} | ||
schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install) | ||
// Install is a function which adds this version to a scheme | ||
Install = schemeBuilder.AddToScheme | ||
|
||
// SchemeGroupVersion generated code relies on this name | ||
// Deprecated | ||
SchemeGroupVersion = GroupVersion | ||
// AddToScheme exists solely to keep the old generators creating valid code | ||
// DEPRECATED | ||
AddToScheme = schemeBuilder.AddToScheme | ||
) | ||
|
||
// Resource generated code relies on this being here, but it logically belongs to the group | ||
// DEPRECATED | ||
func Resource(resource string) schema.GroupResource { | ||
return schema.GroupResource{Group: GroupName, Resource: resource} | ||
} | ||
|
||
func addKnownTypes(scheme *runtime.Scheme) error { | ||
metav1.AddToGroupVersion(scheme, GroupVersion) | ||
|
||
scheme.AddKnownTypes(GroupVersion, | ||
&Authentication{}, | ||
&AuthenticationList{}, | ||
&DNS{}, | ||
&DNSList{}, | ||
&CloudCredential{}, | ||
&CloudCredentialList{}, | ||
&ClusterCSIDriver{}, | ||
&ClusterCSIDriverList{}, | ||
&Console{}, | ||
&ConsoleList{}, | ||
&CSISnapshotController{}, | ||
&CSISnapshotControllerList{}, | ||
&Etcd{}, | ||
&EtcdList{}, | ||
&KubeAPIServer{}, | ||
&KubeAPIServerList{}, | ||
&KubeControllerManager{}, | ||
&KubeControllerManagerList{}, | ||
&KubeScheduler{}, | ||
&KubeSchedulerList{}, | ||
&KubeStorageVersionMigrator{}, | ||
&KubeStorageVersionMigratorList{}, | ||
&MachineConfiguration{}, | ||
&MachineConfigurationList{}, | ||
&Network{}, | ||
&NetworkList{}, | ||
&OpenShiftAPIServer{}, | ||
&OpenShiftAPIServerList{}, | ||
&OpenShiftControllerManager{}, | ||
&OpenShiftControllerManagerList{}, | ||
&OLM{}, | ||
&OLMList{}, | ||
&ServiceCA{}, | ||
&ServiceCAList{}, | ||
&ServiceCatalogAPIServer{}, | ||
&ServiceCatalogAPIServerList{}, | ||
&ServiceCatalogControllerManager{}, | ||
&ServiceCatalogControllerManagerList{}, | ||
&IngressController{}, | ||
&IngressControllerList{}, | ||
&InsightsOperator{}, | ||
&InsightsOperatorList{}, | ||
&Storage{}, | ||
&StorageList{}, | ||
) | ||
|
||
return nil | ||
} |
Oops, something went wrong.