Documentation ¶
Overview ¶
The package provides the models and variables needed to generate code and endpoints for the implemented rorresources
Index ¶
- Variables
- func GetSchemasByType(resourceType ApiResourceType) []schema.GroupVersionResource
- type ApiResource
- func (m ApiResource) GetApiVersion() string
- func (m ApiResource) GetGroup() string
- func (m ApiResource) GetGroupVersionKind() schema.GroupVersionKind
- func (m ApiResource) GetGroupVersionResource() schema.GroupVersionResource
- func (m ApiResource) GetKind() string
- func (m ApiResource) GetResource() string
- func (m ApiResource) GetVersion() string
- func (m ApiResource) PluralCapitalized() string
- type ApiResourceType
Constants ¶
This section is empty.
Variables ¶
View Source
var Resourcedefs = []ApiResource{ { TypeMeta: metav1.TypeMeta{ Kind: "Namespace", APIVersion: "v1", }, Plural: "namespaces", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Node", APIVersion: "v1", }, Plural: "nodes", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "PersistentVolumeClaim", APIVersion: "v1", }, Plural: "persistentvolumeclaims", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Deployment", APIVersion: "apps/v1", }, Plural: "deployments", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "StorageClass", APIVersion: "storage.k8s.io/v1", }, Plural: "storageclasses", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "PolicyReport", APIVersion: "wgpolicyk8s.io/v1alpha2", }, Plural: "policyreports", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Application", APIVersion: "argoproj.io/v1alpha1", }, Plural: "applications", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "AppProject", APIVersion: "argoproj.io/v1alpha1", }, Plural: "appprojects", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Certificate", APIVersion: "cert-manager.io/v1", }, Plural: "certificates", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Service", APIVersion: "v1", }, Plural: "services", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Pod", APIVersion: "v1", }, Plural: "pods", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "ReplicaSet", APIVersion: "apps/v1", }, Plural: "replicasets", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "StatefulSet", APIVersion: "apps/v1", }, Plural: "statefulsets", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "DaemonSet", APIVersion: "apps/v1", }, Plural: "daemonsets", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Ingress", APIVersion: "networking.k8s.io/v1", }, Plural: "ingresses", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "IngressClass", APIVersion: "networking.k8s.io/v1", }, Plural: "ingressclasses", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "VulnerabilityReport", APIVersion: "aquasecurity.github.io/v1alpha1", }, Plural: "vulnerabilityreports", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "ExposedSecretReport", APIVersion: "aquasecurity.github.io/v1alpha1", }, Plural: "exposedsecretreports", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "ConfigAuditReport", APIVersion: "aquasecurity.github.io/v1alpha1", }, Plural: "configauditreports", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "RbacAssessmentReport", APIVersion: "aquasecurity.github.io/v1alpha1", }, Plural: "rbacassessmentreports", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "TanzuKubernetesCluster", APIVersion: "run.tanzu.vmware.com/v1alpha2", }, Plural: "tanzukubernetesclusters", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeTanzuAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "TanzuKubernetesRelease", APIVersion: "run.tanzu.vmware.com/v1alpha2", }, Plural: "tanzukubernetesreleases", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeTanzuAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "VirtualMachineClass", APIVersion: "vmoperator.vmware.com/v1alpha1", }, Plural: "virtualmachineclasses", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeTanzuAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "VirtualMachineClassBinding", APIVersion: "vmoperator.vmware.com/v1alpha1", }, Plural: "virtualmachineclassbindings", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeTanzuAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "KubernetesCluster", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "kubernetesclusters", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeInternal}, }, { TypeMeta: metav1.TypeMeta{ Kind: "ClusterOrder", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "clusterorders", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeInternal}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Project", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "projects", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeInternal}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Configuration", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "configurations", Namespaced: true, Types: []ApiResourceType{ApiResourceTypeInternal}, }, { TypeMeta: metav1.TypeMeta{ Kind: "ClusterComplianceReport", APIVersion: "aquasecurity.github.io/v1alpha1", }, Plural: "clustercompliancereports", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeAgent}, }, { TypeMeta: metav1.TypeMeta{ Kind: "ClusterVulnerabilityReport", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "clustervulnerabilityreports", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeInternal}, }, { TypeMeta: metav1.TypeMeta{ Kind: "Route", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "routes", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeInternal}, }, { TypeMeta: metav1.TypeMeta{ Kind: "SlackMessage", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "slackmessages", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeInternal}, }, { TypeMeta: metav1.TypeMeta{ Kind: "VulnerabilityEvent", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "vulnerabilityevents", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeInternal}, }, { TypeMeta: metav1.TypeMeta{ Kind: "VirtualMachine", APIVersion: "general.ror.internal/v1alpha1", }, Plural: "VirtualMachines", Namespaced: false, Types: []ApiResourceType{ApiResourceTypeVmAgent}, }, }
Resources implemented in ror
When changed the generator must be run, and the files generated checked in with the code.
$ go run build/generator/main.go
Functions ¶
func GetSchemasByType ¶ added in v0.3.11
func GetSchemasByType(resourceType ApiResourceType) []schema.GroupVersionResource
Types ¶
type ApiResource ¶
type ApiResource struct { metav1.TypeMeta `json:",inline"` Plural string Namespaced bool Types []ApiResourceType }
ApiResource The type describing a resource implemented in ror
func GetResourcesByType ¶
func GetResourcesByType(resourceType ApiResourceType) []ApiResource
func (ApiResource) GetApiVersion ¶
func (m ApiResource) GetApiVersion() string
GetApiVersion Generates the apiVersion from the resource object to match with kubernetes api resources
func (ApiResource) GetGroup ¶ added in v0.3.11
func (m ApiResource) GetGroup() string
func (ApiResource) GetGroupVersionKind ¶ added in v0.3.11
func (m ApiResource) GetGroupVersionKind() schema.GroupVersionKind
func (ApiResource) GetGroupVersionResource ¶ added in v0.3.11
func (m ApiResource) GetGroupVersionResource() schema.GroupVersionResource
func (ApiResource) GetKind ¶ added in v0.3.11
func (m ApiResource) GetKind() string
func (ApiResource) GetResource ¶ added in v0.3.11
func (m ApiResource) GetResource() string
func (ApiResource) GetVersion ¶ added in v0.3.11
func (m ApiResource) GetVersion() string
func (ApiResource) PluralCapitalized ¶
func (m ApiResource) PluralCapitalized() string
type ApiResourceType ¶
type ApiResourceType string
const ( ApiResourceTypeUnknown ApiResourceType = "" ApiResourceTypeAgent ApiResourceType = "Agent" ApiResourceTypeVmAgent ApiResourceType = "VmAgent" ApiResourceTypeTanzuAgent ApiResourceType = "TanzuAgent" ApiResourceTypeInternal ApiResourceType = "Internal" )
Click to show internal directories.
Click to hide internal directories.