Skip to content

Commit

Permalink
fix(): add requeueOnFailure field
Browse files Browse the repository at this point in the history
  • Loading branch information
RohanKumarMainali committed Jan 3, 2025
1 parent 5849e69 commit b68c6bc
Show file tree
Hide file tree
Showing 15 changed files with 155 additions and 113 deletions.
39 changes: 20 additions & 19 deletions apis/controller/v1alpha1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,65 +55,66 @@ type ClusterSpec struct {
NodeIPs []string `json:"nodeIPs,omitempty"`
// NetworkInterface is the network interface attached with the cluster.
NetworkInterface string `json:"networkInterface,omitempty"`
//put in an object
ClusterProperty ClusterProperty `json:"clusterProperty,omitempty"`
EnableAutoEviction bool `json:"enableAutoEviction,omitempty"`
// put in an object
ClusterProperty ClusterProperty `json:"clusterProperty,omitempty"`
EnableAutoEviction bool `json:"enableAutoEviction,omitempty"`
RequeueOnFailure bool `json:"requeueOnFailure,omitempty"`
}

type ClusterProperty struct {
//Telemetry contains Telemetry information
// Telemetry contains Telemetry information
Telemetry Telemetry `json:"telemetry,omitempty"`
//GeoLocation contains information regarding Geographical Location of the Cluster
// GeoLocation contains information regarding Geographical Location of the Cluster
GeoLocation GeoLocation `json:"geoLocation,omitempty"`
//Monitoring contains the Kubernetes Monitoring Dashboard
// Monitoring contains the Kubernetes Monitoring Dashboard
Monitoring Monitoring `json:"monitoring,omitempty"`
}

// Telemetry defines the field of ClusterSpec
type Telemetry struct {
//Enabled is the enable status of the Telemetry
// Enabled is the enable status of the Telemetry
Enabled bool `json:"enabled,omitempty"`
//TelemetryProvider is the Telemetry Provider information
// TelemetryProvider is the Telemetry Provider information
TelemetryProvider string `json:"telemetryProvider,omitempty"`
//Endpoint is the Telemetry Endpoint
// Endpoint is the Telemetry Endpoint
Endpoint string `json:"endpoint,omitempty"`
}

// GeoLocation defines the field of ClusterSpec
type GeoLocation struct {
//CloudProvider is the cloud service provider
// CloudProvider is the cloud service provider
CloudProvider string `json:"cloudProvider,omitempty"`
//CloudRegion is the region of the cloud
// CloudRegion is the region of the cloud
CloudRegion string `json:"cloudRegion,omitempty"`
//Latitude is the latitude of the cluster
// Latitude is the latitude of the cluster
Latitude string `json:"latitude,omitempty"`
//Longitude is the longitude of the cluster
// Longitude is the longitude of the cluster
Longitude string `json:"longitude,omitempty"`
}

// Monitoring defines the field of ClusterSpec
type Monitoring struct {
//KubernetesDashboard contains the information regarding Kubernetes Monitoring Dashboard
// KubernetesDashboard contains the information regarding Kubernetes Monitoring Dashboard
KubernetesDashboard KubernetesDashboard `json:"kubernetesDashboard,omitempty"`
}

// KubernetesDashboard defines the field of ClusterSpec
type KubernetesDashboard struct {
//Enabled is the enable status of the KubernetesDashboard
// Enabled is the enable status of the KubernetesDashboard
Enabled bool `json:"enabled,omitempty"`
//AccessToken is the Access Token to access the KubernetesDashboard
// AccessToken is the Access Token to access the KubernetesDashboard
AccessToken string `json:"accessToken,omitempty"`
//IngressPrefix is the prefix of ingress gateway for KubernetesDashboard
// IngressPrefix is the prefix of ingress gateway for KubernetesDashboard
IngressPrefix string `json:"ingressPrefix,omitempty"`
//Endpoint is the base endpoint to access the kubernetes dashboard
// Endpoint is the base endpoint to access the kubernetes dashboard
Endpoint string `json:"endpoint,omitempty"`
}

// ClusterStatus defines the observed state of Cluster
type ClusterStatus struct {
// SecretName is the name of the secret for the worker cluster.
SecretName string `json:"secretName,omitempty"`
//CniSubnet is the podip and service ip subnet of CNI
// CniSubnet is the podip and service ip subnet of CNI
CniSubnet []string `json:"cniSubnet,omitempty"`
// Namespaces present in cluster
Namespaces []NamespacesConfig `json:"namespaces,omitempty"`
Expand Down
7 changes: 4 additions & 3 deletions apis/controller/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/worker/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions config/crd/bases/controller.kubeslice.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: clusters.controller.kubeslice.io
spec:
group: controller.kubeslice.io
Expand All @@ -21,14 +20,19 @@ spec:
description: Cluster is the Schema for the clusters API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -107,6 +111,8 @@ spec:
items:
type: string
type: array
requeueOnFailure:
type: boolean
type: object
status:
description: ClusterStatus defines the observed state of Cluster
Expand Down
20 changes: 12 additions & 8 deletions config/crd/bases/controller.kubeslice.io_projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: projects.controller.kubeslice.io
spec:
group: controller.kubeslice.io
Expand All @@ -21,14 +20,19 @@ spec:
description: Project is the Schema for the projects API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down
25 changes: 15 additions & 10 deletions config/crd/bases/controller.kubeslice.io_serviceexportconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: serviceexportconfigs.controller.kubeslice.io
spec:
group: controller.kubeslice.io
Expand All @@ -22,23 +21,29 @@ spec:
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: ServiceExportConfigSpec defines the desired state of ServiceExportConfig
properties:
aliases:
description: Alias names for the exported service. The service could
be addressed by the alias names in addition to the slice.local name.
description: |-
Alias names for the exported service. The service could be addressed by the alias names
in addition to the slice.local name.
items:
type: string
type: array
Expand Down
20 changes: 12 additions & 8 deletions config/crd/bases/controller.kubeslice.io_sliceconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: sliceconfigs.controller.kubeslice.io
spec:
group: controller.kubeslice.io
Expand All @@ -21,14 +20,19 @@ spec:
description: SliceConfig is the Schema for the sliceconfig API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down
20 changes: 12 additions & 8 deletions config/crd/bases/controller.kubeslice.io_sliceqosconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: sliceqosconfigs.controller.kubeslice.io
spec:
group: controller.kubeslice.io
Expand All @@ -21,14 +20,19 @@ spec:
description: SliceQoSConfig is the Schema for the sliceqosconfigs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down
26 changes: 15 additions & 11 deletions config/crd/bases/controller.kubeslice.io_vpnkeyrotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: vpnkeyrotations.controller.kubeslice.io
spec:
group: controller.kubeslice.io
Expand All @@ -21,14 +20,19 @@ spec:
description: VpnKeyRotation is the Schema for the vpnkeyrotations API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand All @@ -50,9 +54,9 @@ spec:
items:
type: string
type: array
description: ClusterGatewayMapping represents a map where key is cluster
name and value is array of gateways present on that cluster. This
is used to avoid unnecessary reconciliation in worker-operator.
description: |-
ClusterGatewayMapping represents a map where key is cluster name and value is array of gateways present on that cluster.
This is used to avoid unnecessary reconciliation in worker-operator.
type: object
clusters:
description: clusters contains the list of clusters attached to this
Expand Down
Loading

0 comments on commit b68c6bc

Please sign in to comment.