Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.19.0
name: infrastoragepolicyinfoes.cns.vmware.com
spec:
group: cns.vmware.com
names:
kind: InfraStoragePolicyInfo
listKind: InfraStoragePolicyInfoList
plural: infrastoragepolicyinfoes
shortNames:
- infraspi
singular: infrastoragepolicyinfo
scope: Cluster
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: InfraStoragePolicyInfo is the Schema for the infrastoragepolicyinfoes
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
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
type: string
metadata:
type: object
status:
description: InfraStoragePolicyInfoStatus defines the observed state of
InfraStoragePolicyInfo.
properties:
error:
description: Error describes a failure condition when observing or
reconciling this resource.
type: string
topology:
description: Topology contains observed topology for this storage
policy in the cluster.
properties:
accessibleZones:
description: AccessibleZones lists zones where the policy is accessible
for this cluster.
items:
type: string
type: array
error:
description: Error describes a failure condition when resolving
topology for this storage policy.
type: string
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
20 changes: 20 additions & 0 deletions pkg/apis/cnsoperator/infrastoragepolicyinfo/v1alpha1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright 2026 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.
*/

// +k8s:deepcopy-gen=package
// +k8s:defaulter-gen=TypeMeta
// +groupName=cns.vmware.com
package v1alpha1
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
Copyright 2026 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.
*/

package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Topology describes topology accessibility for the storage policy within the cluster.
type Topology struct {
// AccessibleZones lists zones where the policy is accessible for this cluster.
// +optional
AccessibleZones []string `json:"accessibleZones,omitempty"`

// Error describes a failure condition when resolving topology for this storage policy.
// +optional
Error string `json:"error,omitempty"`
}

// InfraStoragePolicyInfoStatus defines the observed state of InfraStoragePolicyInfo.
// +k8s:openapi-gen=true
type InfraStoragePolicyInfoStatus struct {
// Topology contains observed topology for this storage policy in the cluster.
// +optional
Topology *Topology `json:"topology,omitempty"`

// Error describes a failure condition when observing or reconciling this resource.
// +optional
Error string `json:"error,omitempty"`
}

// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=infraspi,scope=Cluster,path=infrastoragepolicyinfoes

// InfraStoragePolicyInfo is the Schema for the infrastoragepolicyinfoes API.
type InfraStoragePolicyInfo struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Status InfraStoragePolicyInfoStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// InfraStoragePolicyInfoList contains a list of InfraStoragePolicyInfo.
type InfraStoragePolicyInfoList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []InfraStoragePolicyInfo `json:"items"`
}

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