diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1d5334f..9cf3f51 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -57,3 +57,19 @@ changelog: exclude: - "^docs:" - "^test:" + +nfpms: + - id: kform-nfpms + file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + package_name: kform + maintainer: Wim Henderickx + homepage: https://kform.dev + description: | + Kform is an KRM as code/data tool. + vendor: Nokia + license: GNU GPLv3 + formats: + - rpm + - deb + - apk + bindir: /usr/bin \ No newline at end of file diff --git a/examples/crd/auto.nephio.org_replicasets.yaml b/examples/crd/auto.nephio.org_replicasets.yaml deleted file mode 100644 index 9256fda..0000000 --- a/examples/crd/auto.nephio.org_replicasets.yaml +++ /dev/null @@ -1,208 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: replicasets.auto.nephio.org -spec: - group: auto.nephio.org - names: - categories: - - nephio - - inv - kind: ReplicaSet - listKind: ReplicaSetList - plural: replicasets - singular: replicaset - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: ReplicaSet is the Schema for the ReplicaSet 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 - spec: - description: ReplicaSetSpec defines the desired state of ReplicaSet - properties: - pipeline: - properties: - mutators: - description: Mutators defines a list of of KRM functions that - mutate the templ;ate. - items: - properties: - expression: - type: string - type: object - type: array - validators: - description: Validators defines a list of KRM functions that validate - resources. Validators are not permitted to mutate resources. - items: - properties: - expression: - type: string - type: object - type: array - type: object - replicas: - description: Number of desired replicas. This is a pointer to distinguish - between explicit zero and not specified. Defaults to 1. - format: int32 - type: integer - selectors: - description: ObjectSelector selects objects that can be served as - input to the pipeline for parameter mutation/validation - items: - properties: - apiVersion: - description: APIVersion of the target resources - type: string - kind: - description: Kind of the target resources - type: string - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. - type: object - name: - description: Name of the target resource - type: string - variableName: - description: VariableName is the name of the variable that is - used for variable propagation - type: string - required: - - variableName - type: object - x-kubernetes-map-type: atomic - type: array - template: - description: Template is the embedded KRM template - type: object - x-kubernetes-preserve-unknown-fields: true - required: - - template - type: object - status: - description: ReplicaSetStatus defines the observed state of ReplicaSet - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/inv.nephio.org_endpoints.yaml b/examples/crd/inv.nephio.org_endpoints.yaml deleted file mode 100644 index b03cb23..0000000 --- a/examples/crd/inv.nephio.org_endpoints.yaml +++ /dev/null @@ -1,196 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: endpoints.inv.nephio.org -spec: - group: inv.nephio.org - names: - categories: - - nephio - - inv - kind: Endpoint - listKind: EndpointList - plural: endpoints - singular: endpoint - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.namespace - name: TOPOLOGY - type: string - - jsonPath: .status.claimRef - name: CLAIMREF - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Endpoint is the Schema for the vlan 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 - spec: - description: EndpointSpec defines the desired state of Endpoint - properties: - interfaceName: - description: topology defines the topology to which this endpoint - belongs Topology string `json:"topology,omitempty" yaml:"topology,omitempty"` - InterfaceName provide the name of the interface of the endpoint - maxLength: 64 - type: string - lacpFallback: - description: LacpFallback defines if the link is part of a lag mutually - exclusive with Lag parameter - type: boolean - nodeName: - description: NodeName provide the name of the node on which this endpoint - belongs. - maxLength: 64 - type: string - required: - - interfaceName - - nodeName - type: object - status: - description: EndpointStatus defines the observed state of Endpoint - properties: - claimRef: - description: "ObjectReference contains enough information to let you - inspect or modify the referred object. --- New uses of this type - are discouraged because of difficulty describing its usage when - embedded in APIs. 1. Ignored fields. It includes many fields which - are not generally honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid usage help. - \ It is impossible to add specific help for individual usage. In - most embedded usages, there are particular restrictions like, \"must - refer only to types A and B\" or \"UID not honored\" or \"name must - be restricted\". Those cannot be well described when embedded. 3. - Inconsistent validation. Because the usages are different, the - validation rules are different by usage, which makes it hard for - users to predict what will happen. 4. The fields are both imprecise - and overly precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and require a REST mapping. - \ In most cases, the dependency is on the group,resource tuple and - the version of the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, updates - to this type will affect numerous schemas. Don't make new APIs - embed an underspecified API type they do not control. \n Instead - of using this type, create a locally provided and used type that - is well-focused on your reference. For example, ServiceReferences - for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - ." - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - vtepID: - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/inv.nephio.org_links.yaml b/examples/crd/inv.nephio.org_links.yaml deleted file mode 100644 index c6dd7a9..0000000 --- a/examples/crd/inv.nephio.org_links.yaml +++ /dev/null @@ -1,177 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: links.inv.nephio.org -spec: - group: inv.nephio.org - names: - categories: - - nephio - - inv - kind: Link - listKind: LinkList - plural: links - singular: link - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .status.conditions[?(@.type=='Wired')].status - name: WIRED - type: string - - jsonPath: .spec.endpoints[0].topology - name: TOPOLOGY_0 - type: string - - jsonPath: .spec.endpoints[0].nodeName - name: NODE_NAME_0 - type: string - - jsonPath: .spec.endpoints[0].interfaceName - name: IF_NAME_0 - type: string - - jsonPath: .spec.endpoints[1].topology - name: TOPOLOGY_1 - type: string - - jsonPath: .spec.endpoints[1].nodeName - name: NODE_NAME_1 - type: string - - jsonPath: .spec.endpoints[1].interfaceName - name: IF_NAME_1 - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Link is the Schema for the vlan 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 - spec: - description: LinkSpec defines the desired state of Link - properties: - endpoints: - description: Endpoints define the node + interface endpoints associated - with this link - items: - properties: - interfaceName: - description: topology defines the topology to which this endpoint - belongs Topology string `json:"topology,omitempty" yaml:"topology,omitempty"` - InterfaceName provide the name of the interface of the endpoint - maxLength: 64 - type: string - lacpFallback: - description: LacpFallback defines if the link is part of a lag - mutually exclusive with Lag parameter - type: boolean - nodeName: - description: NodeName provide the name of the node on which - this endpoint belongs. - maxLength: 64 - type: string - topology: - description: topology defines the topology to which this endpoint - belongs - maxLength: 64 - type: string - required: - - interfaceName - - nodeName - - topology - type: object - maxItems: 2 - minItems: 2 - type: array - x-kubernetes-list-map-keys: - - topology - - nodeName - - interfaceName - x-kubernetes-list-type: map - x-kubernetes-validations: - - message: Link Endpoints are immutable - rule: self.all(element, element in oldSelf) - required: - - endpoints - type: object - status: - description: LinkStatus defines the observed state of Link - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/inv.nephio.org_logicalendpoints.yaml b/examples/crd/inv.nephio.org_logicalendpoints.yaml deleted file mode 100644 index f26b506..0000000 --- a/examples/crd/inv.nephio.org_logicalendpoints.yaml +++ /dev/null @@ -1,162 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: logicalendpoints.inv.nephio.org -spec: - group: inv.nephio.org - names: - categories: - - nephio - - inv - kind: LogicalEndpoint - listKind: LogicalEndpointList - plural: logicalendpoints - singular: logicalendpoint - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: LogicalEndpoint is the Schema for the vlan 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 - spec: - description: LogicalEndpointSpec defines the desired state of LogicalEndpoint - properties: - endpoints: - description: Endpoints define the endpoints that belong to the logical - link - items: - description: EndpointSpec defines the desired state of Endpoint - properties: - interfaceName: - description: topology defines the topology to which this endpoint - belongs Topology string `json:"topology,omitempty" yaml:"topology,omitempty"` - InterfaceName provide the name of the interface of the endpoint - maxLength: 64 - type: string - lacpFallback: - description: LacpFallback defines if the link is part of a lag - mutually exclusive with Lag parameter - type: boolean - nodeName: - description: NodeName provide the name of the node on which - this endpoint belongs. - maxLength: 64 - type: string - required: - - interfaceName - - nodeName - type: object - maxItems: 16 - minItems: 1 - type: array - lacp: - description: Lacp defines if the lag enabled LACP - type: boolean - name: - description: MultiHoming defines if this logical endpoint is multi-homed - MultiHoming *bool `json:"multiHoming,omitempty" yaml:"multiHoming,omitempty"` - Name defines the logical endpoint name can be single-homed or multi-homed - type: string - required: - - endpoints - type: object - status: - description: LogicalEndpointStatus defines the observed state of LogicalEndpoint - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - esi: - description: ESI defines the ethernet segment identifier of the logical - link if set this is a multi-homed logical endpoint the ESI is a - global unique identifier within the administrative domain/topology - format: int32 - type: integer - lagId: - description: LagId defines the lag id for the logical single-homed - or multi-homed endpoint - format: int32 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/inv.nephio.org_nodeconfigs.yaml b/examples/crd/inv.nephio.org_nodeconfigs.yaml deleted file mode 100644 index 35eaba1..0000000 --- a/examples/crd/inv.nephio.org_nodeconfigs.yaml +++ /dev/null @@ -1,104 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: nodeconfigs.inv.nephio.org -spec: - group: inv.nephio.org - names: - kind: NodeConfig - listKind: NodeConfigList - plural: nodeconfigs - singular: nodeconfig - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: NodeConfig is the Schema for the srlinux nodeconfig 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 - spec: - properties: - constraints: - additionalProperties: - type: string - description: Constraints defaines the key/value constraints e.g. cpu, - memory - type: object - image: - description: Image used to bootup the container - type: string - licenseKey: - description: license key from license secret that contains a license - file - type: string - model: - description: Model encodes variants (e.g. srlinux ixr-d3, ixr-6e, - etc) - type: string - parametersRef: - description: ParametersRef points to the vendor or implementation - specific params for the node. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - provider: - description: Provider specifies the provider implementing this node - config. - type: string - startupConfig: - description: StartupConfig is pointer to the config map thaat contains - the startup config - type: string - required: - - provider - type: object - type: object - served: true - storage: true diff --git a/examples/crd/inv.nephio.org_nodemodels.yaml b/examples/crd/inv.nephio.org_nodemodels.yaml deleted file mode 100644 index f9cbe72..0000000 --- a/examples/crd/inv.nephio.org_nodemodels.yaml +++ /dev/null @@ -1,97 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: nodemodels.inv.nephio.org -spec: - group: inv.nephio.org - names: - kind: NodeModel - listKind: NodeModelList - plural: nodemodels - singular: nodemodel - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: NodeModel is the Schema for the srlinux node model 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 - spec: - properties: - interfaces: - description: Interfaces defines the interfaces belonging to the node - model - items: - properties: - name: - type: string - speed: - type: string - required: - - speed - type: object - type: array - parametersRef: - description: ParametersRef points to the vendor or implementation - specific params for the node. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - provider: - description: Provider specifies the provider implementing this node - config. - type: string - required: - - interfaces - - provider - type: object - type: object - served: true - storage: true diff --git a/examples/crd/inv.nephio.org_nodepools.yaml b/examples/crd/inv.nephio.org_nodepools.yaml deleted file mode 100644 index f338189..0000000 --- a/examples/crd/inv.nephio.org_nodepools.yaml +++ /dev/null @@ -1,294 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: nodepools.inv.nephio.org -spec: - group: inv.nephio.org - names: - categories: - - nephio - - inv - kind: NodePool - listKind: NodePoolList - plural: nodepools - singular: nodepool - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .metadata.namespace - name: TOPOLOGY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: NodePool is the Schema for the NodePool 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 - spec: - description: NodePoolSpec defines the desired state of NodePool - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - location: - description: Location defines the location information where this - resource is located in lon/lat coordinates - properties: - latitude: - type: string - longitude: - type: string - type: object - nodeConfig: - description: NodeConfig provides a reference to a node config resource - only name is used, we expect the namespace to be the same as the - nodepool - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - provider: - description: Provider defines the provider implementing this nodepool. - type: string - required: - - provider - type: object - status: - description: NodePoolStatus defines the observed state of NodePool - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - usedNodeConfigRef: - description: "ObjectReference contains enough information to let you - inspect or modify the referred object. --- New uses of this type - are discouraged because of difficulty describing its usage when - embedded in APIs. 1. Ignored fields. It includes many fields which - are not generally honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid usage help. - \ It is impossible to add specific help for individual usage. In - most embedded usages, there are particular restrictions like, \"must - refer only to types A and B\" or \"UID not honored\" or \"name must - be restricted\". Those cannot be well described when embedded. 3. - Inconsistent validation. Because the usages are different, the - validation rules are different by usage, which makes it hard for - users to predict what will happen. 4. The fields are both imprecise - and overly precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and require a REST mapping. - \ In most cases, the dependency is on the group,resource tuple and - the version of the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, updates - to this type will affect numerous schemas. Don't make new APIs - embed an underspecified API type they do not control. \n Instead - of using this type, create a locally provided and used type that - is well-focused on your reference. For example, ServiceReferences - for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - ." - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - usedNodeModelRef: - description: "ObjectReference contains enough information to let you - inspect or modify the referred object. --- New uses of this type - are discouraged because of difficulty describing its usage when - embedded in APIs. 1. Ignored fields. It includes many fields which - are not generally honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid usage help. - \ It is impossible to add specific help for individual usage. In - most embedded usages, there are particular restrictions like, \"must - refer only to types A and B\" or \"UID not honored\" or \"name must - be restricted\". Those cannot be well described when embedded. 3. - Inconsistent validation. Because the usages are different, the - validation rules are different by usage, which makes it hard for - users to predict what will happen. 4. The fields are both imprecise - and overly precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and require a REST mapping. - \ In most cases, the dependency is on the group,resource tuple and - the version of the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, updates - to this type will affect numerous schemas. Don't make new APIs - embed an underspecified API type they do not control. \n Instead - of using this type, create a locally provided and used type that - is well-focused on your reference. For example, ServiceReferences - for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - ." - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/inv.nephio.org_nodes.yaml b/examples/crd/inv.nephio.org_nodes.yaml deleted file mode 100644 index 1072070..0000000 --- a/examples/crd/inv.nephio.org_nodes.yaml +++ /dev/null @@ -1,306 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: nodes.inv.nephio.org -spec: - group: inv.nephio.org - names: - categories: - - nephio - - inv - kind: Node - listKind: NodeList - plural: nodes - singular: node - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .status.conditions[?(@.type=='EPReady')].status - name: EPREADY - type: string - - jsonPath: .metadata.namespace - name: TOPOLOGY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Node is the Schema for the vlan 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 - spec: - description: NodeSpec defines the desired state of Node - properties: - address: - description: Address defines the address of the mgmt interface of - this node - type: string - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - location: - description: Location defines the location information where this - resource is located in lon/lat coordinates - properties: - latitude: - type: string - longitude: - type: string - type: object - nodeConfig: - description: NodeConfig provides a reference to a node config resource - only name is used, we expect the namespace to be the same as the - node for now - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - provider: - description: Topology defines the topology to which this node belongs - Topology is actually a mandatory parameter, but to be able to reuse - this struct for both rawtopology and node CRD we allow this validation - is done in the respective controllers Topology string `json:"topology,omitempty" - yaml:"topology,omitempty"` Provider defines the provider implementing - this node. - type: string - required: - - provider - type: object - status: - description: NodeStatus defines the observed state of Node - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - usedNodeConfigRef: - description: "ObjectReference contains enough information to let you - inspect or modify the referred object. --- New uses of this type - are discouraged because of difficulty describing its usage when - embedded in APIs. 1. Ignored fields. It includes many fields which - are not generally honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid usage help. - \ It is impossible to add specific help for individual usage. In - most embedded usages, there are particular restrictions like, \"must - refer only to types A and B\" or \"UID not honored\" or \"name must - be restricted\". Those cannot be well described when embedded. 3. - Inconsistent validation. Because the usages are different, the - validation rules are different by usage, which makes it hard for - users to predict what will happen. 4. The fields are both imprecise - and overly precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and require a REST mapping. - \ In most cases, the dependency is on the group,resource tuple and - the version of the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, updates - to this type will affect numerous schemas. Don't make new APIs - embed an underspecified API type they do not control. \n Instead - of using this type, create a locally provided and used type that - is well-focused on your reference. For example, ServiceReferences - for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - ." - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - usedNodeModelRef: - description: "ObjectReference contains enough information to let you - inspect or modify the referred object. --- New uses of this type - are discouraged because of difficulty describing its usage when - embedded in APIs. 1. Ignored fields. It includes many fields which - are not generally honored. For instance, ResourceVersion and FieldPath - are both very rarely valid in actual usage. 2. Invalid usage help. - \ It is impossible to add specific help for individual usage. In - most embedded usages, there are particular restrictions like, \"must - refer only to types A and B\" or \"UID not honored\" or \"name must - be restricted\". Those cannot be well described when embedded. 3. - Inconsistent validation. Because the usages are different, the - validation rules are different by usage, which makes it hard for - users to predict what will happen. 4. The fields are both imprecise - and overly precise. Kind is not a precise mapping to a URL. This - can produce ambiguity during interpretation and require a REST mapping. - \ In most cases, the dependency is on the group,resource tuple and - the version of the actual struct is irrelevant. 5. We cannot easily - change it. Because this type is embedded in many locations, updates - to this type will affect numerous schemas. Don't make new APIs - embed an underspecified API type they do not control. \n Instead - of using this type, create a locally provided and used type that - is well-focused on your reference. For example, ServiceReferences - for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 - ." - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/inv.nephio.org_targets.yaml b/examples/crd/inv.nephio.org_targets.yaml deleted file mode 100644 index 9d678c1..0000000 --- a/examples/crd/inv.nephio.org_targets.yaml +++ /dev/null @@ -1,185 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: targets.inv.nephio.org -spec: - group: inv.nephio.org - names: - categories: - - nephio - - inv - kind: Target - listKind: TargetList - plural: targets - singular: target - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Target is the Schema for the vlan 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 - spec: - description: TargetSpec defines the desired state of Target - properties: - address: - description: Address defines the address of the mgmt ip address of - the target - type: string - encoding: - enum: - - unknown - - JSON - - JSON_IETF - - bytes - - protobuf - - ASCII - type: string - insecure: - type: boolean - parametersRef: - description: ParametersRef points to the vendor or implementation - specific params for the target. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - protocol: - enum: - - unknown - - gnmi - - netconf - type: string - provider: - description: Provider specifies the provider using this target. - type: string - secretName: - description: SecretName defines the name of the secret - type: string - skipVerify: - type: boolean - tlsSecretName: - type: string - required: - - provider - - secretName - type: object - status: - description: TargetStatus defines the observed state of Target - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: diff --git a/examples/crd/inv.nephio.org_topologies.yaml b/examples/crd/inv.nephio.org_topologies.yaml deleted file mode 100644 index b6eac9f..0000000 --- a/examples/crd/inv.nephio.org_topologies.yaml +++ /dev/null @@ -1,112 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: topologies.inv.nephio.org -spec: - group: inv.nephio.org - names: - categories: - - nephio - - inv - kind: Topology - listKind: TopologyList - plural: topologies - singular: topology - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Topology is the Schema for the topology 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 - spec: - description: TopologySpec defines the desired state of a Topology - type: object - status: - description: TopologyStatus defines the observed state of a Topology - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/ipam.resource.nephio.org_ipclaims.yaml b/examples/crd/ipam.resource.nephio.org_ipclaims.yaml deleted file mode 100644 index 5912d59..0000000 --- a/examples/crd/ipam.resource.nephio.org_ipclaims.yaml +++ /dev/null @@ -1,281 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: ipclaims.ipam.resource.nephio.org -spec: - group: ipam.resource.nephio.org - names: - categories: - - nephio - - resource - kind: IPClaim - listKind: IPClaimList - plural: ipclaims - singular: ipclaim - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNC - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: STATUS - type: string - - jsonPath: .spec.networkInstance.name - name: NETWORK-INSTANCE - type: string - - jsonPath: .spec.kind - name: KIND - type: string - - jsonPath: .spec.addressFamily - name: AF - type: string - - jsonPath: .spec.prefixLength - name: PREFIXLENGTH - type: string - - jsonPath: .spec.prefix - name: PREFIX-REQ - type: string - - jsonPath: .status.prefix - name: PREFIX-ALLOC - type: string - - jsonPath: .status.gateway - name: GATEWAY - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: IPClaim is the Schema for the ipclaim 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 - spec: - description: IPClaimSpec defines the desired state of IPClaim - properties: - addressFamily: - description: AddressFamily defines the address family for the IP claim - enum: - - ipv4 - - ipv6 - type: string - createPrefix: - description: CreatePrefix defines if this prefix must be created. - Only used for non address prefixes e.g. non /32 ipv4 and non /128 - ipv6 prefixes - type: boolean - index: - description: Index defines the index of the IP Claim, used to get - a deterministic IP from a prefix If not present we claim a random - prefix from a prefix - format: int32 - type: integer - kind: - default: network - description: Kind defines the kind of prefix for the IP Claim - network - kind is used for physical, virtual nics on a device - loopback kind - is used for loopback interfaces - pool kind is used for pools for - dhcp/radius/bng/upf/etc - aggregate kind is used for claiming an - aggregate prefix - enum: - - network - - loopback - - pool - - aggregate - type: string - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - networkInstance: - description: NetworkInstance defines the networkInstance context for - the IP claim Name and optionally Namespace is used here - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - prefix: - description: Prefix defines the prefix for the IP claim Used for specific - prefix claim or used as a hint for a dynamic prefix claim in case - of restart - pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8]))) - type: string - prefixLength: - description: PrefixLength defines the prefix length for the IP Claim - If not present we use assume /32 for ipv4 and /128 for ipv6 - type: integer - selector: - description: Selector defines the selector criterias - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - kind - - networkInstance - type: object - status: - description: IPClaimStatus defines the observed state of IPClaim - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - expiryTime: - description: ExpiryTime defines when the claim expires - type: string - gateway: - description: Gateway defines the gateway IP for the claimed prefix - Gateway is only relevant for prefix kind = network - type: string - prefix: - description: Prefix defines the prefix, claimed through the IPAM backend - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/ipam.resource.nephio.org_ipprefixes.yaml b/examples/crd/ipam.resource.nephio.org_ipprefixes.yaml deleted file mode 100644 index 9f939d6..0000000 --- a/examples/crd/ipam.resource.nephio.org_ipprefixes.yaml +++ /dev/null @@ -1,201 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: ipprefixes.ipam.resource.nephio.org -spec: - group: ipam.resource.nephio.org - names: - categories: - - nephio - - resource - kind: IPPrefix - listKind: IPPrefixList - plural: ipprefixes - singular: ipprefix - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNC - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: STATUS - type: string - - jsonPath: .spec.networkInstance.name - name: NETWORK-INSTANCE - type: string - - jsonPath: .spec.kind - name: KIND - type: string - - jsonPath: .spec.subnetName - name: SUBNET - type: string - - jsonPath: .spec.prefix - name: PREFIX-REQ - type: string - - jsonPath: .status.prefix - name: PREFIX-ALLOC - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: IPPrefix is the Schema for the ipprefixes 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 - spec: - description: IPPrefixSpec defines the desired state of IPPrefix - properties: - kind: - default: network - description: Kind defines the kind of prefix for the IP Claim - network - kind is used for physical, virtual nics on a device - loopback kind - is used for loopback interfaces - pool kind is used for pools for - dhcp/radius/bng/upf/etc - aggregate kind is used for claiming an - aggregate prefix - enum: - - network - - loopback - - pool - - aggregate - type: string - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - networkInstance: - description: NetworkInstance defines the networkInstance context for - the IP prefix Name and optionally Namespace is used here - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - prefix: - description: Prefix defines the ip cidr in prefix or address notation. - pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8]))) - type: string - required: - - kind - - networkInstance - - prefix - type: object - status: - description: IPPrefixStatus defines the observed state of IPPrefix - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - prefix: - description: Prefix defines the prefix, claimed through the IPAM backend - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/ipam.resource.nephio.org_networkinstances.yaml b/examples/crd/ipam.resource.nephio.org_networkinstances.yaml deleted file mode 100644 index 903a109..0000000 --- a/examples/crd/ipam.resource.nephio.org_networkinstances.yaml +++ /dev/null @@ -1,176 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: networkinstances.ipam.resource.nephio.org -spec: - group: ipam.resource.nephio.org - names: - categories: - - nephio - - resource - kind: NetworkInstance - listKind: NetworkInstanceList - plural: networkinstances - singular: networkinstance - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNC - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: STATUS - type: string - - jsonPath: .metadata.name - name: NETWORK-INSTANCE - type: string - - jsonPath: .spec.prefixes[0].prefix - name: PREFIX0 - type: string - - jsonPath: .spec.prefixes[1].prefix - name: PREFIX1 - type: string - - jsonPath: .spec.prefixes[2].prefix - name: PREFIX2 - type: string - - jsonPath: .spec.prefixes[3].prefix - name: PREFIX3 - type: string - - jsonPath: .spec.prefixes[4].prefix - name: PREFIX4 - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: NetworkInstance is the Schema for the networkinstances 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 - spec: - description: NetworkInstanceSpec defines the desired state of NetworkInstance - properties: - prefixes: - description: Prefixes define the aggregate prefixes for the network - instance A Network instance needs at least 1 prefix to be defined - to become operational - items: - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - prefix: - description: Prefix defines the ip cidr in prefix notation. - pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8]))) - type: string - required: - - prefix - type: object - type: array - required: - - prefixes - type: object - status: - description: NetworkInstanceStatus defines the observed state of NetworkInstance - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - prefixes: - description: Prefixes defines the prefixes, claimed through the IPAM - backend - items: - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - prefix: - description: Prefix defines the ip cidr in prefix notation. - pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8]))) - type: string - required: - - prefix - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/topo.nephio.org_interconnects.yaml b/examples/crd/topo.nephio.org_interconnects.yaml deleted file mode 100644 index 154d580..0000000 --- a/examples/crd/topo.nephio.org_interconnects.yaml +++ /dev/null @@ -1,238 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: interconnects.topo.nephio.org -spec: - group: topo.nephio.org - names: - categories: - - nephio - - inv - kind: Interconnect - listKind: InterconnectList - plural: interconnects - singular: interconnect - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Interconnect is the Schema for the interconnect 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 - spec: - description: InterconnectSpec defines the desired state of Interconnect - properties: - links: - description: Links define the links part of the interconnect - items: - properties: - endpoints: - description: Endpoints defines exactly 2 endpoints, the first - entry is the local endpoint, the 2nd entry is the remote endpoint - items: - description: InterconnectLinkEndpoint - properties: - interfaceName: - description: InterfaceName defines the name of the interface - on which this interconnect originates/terminates - type: string - logicalEndpointName: - description: logicalEndpointName - type: string - nodeName: - description: NodeName provide the name of the node on - which this interconnect originates/terminates NodeName - allows for multi-homing if multiple endpoints of a InterconnectLink - reside on different nodes - type: string - selector: - description: A label selector is a label query over a - set of resources. The result of matchLabels and matchExpressions - are ANDed. An empty label selector matches all objects. - A null label selector matches no objects. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, - NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values - array must be non-empty. If the operator is - Exists or DoesNotExist, the values array must - be empty. This array is replaced during a - strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field - is "key", the operator is "In", and the values array - contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - selectorPolicy: - properties: - multiHomedNodes: - format: int32 - type: integer - type: object - topology: - description: topology defines the topology to which this - endpoint belongs - type: string - type: object - maxItems: 2 - minItems: 2 - type: array - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - lacp: - type: boolean - links: - description: Links define the physical links in an interconnect - link this means this is an abstract interconnect link - format: int32 - type: integer - logicalLinkId: - description: LogicalLinkId defines the logical link id to which - this logical link belongs when using abstract interconnect - links this is derived from the link index - type: integer - name: - type: string - type: - description: lag, vesi - type: string - required: - - endpoints - type: object - type: array - topologies: - description: topologies define the topologies used to interconnect - can either be specified globally (here) or at the endpoint level - of the interconnectLink. When specified globally (here) it can only - have 2 topologies the local topologies will be - items: - type: string - maxItems: 2 - minItems: 2 - type: array - required: - - links - type: object - status: - description: InterconnectStatus defines the observed state of Interconnect - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/topo.nephio.org_interconnectsets.yaml b/examples/crd/topo.nephio.org_interconnectsets.yaml deleted file mode 100644 index 3817ddb..0000000 --- a/examples/crd/topo.nephio.org_interconnectsets.yaml +++ /dev/null @@ -1,273 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null - name: interconnectsets.topo.nephio.org -spec: - group: topo.nephio.org - names: - categories: - - nephio - - inv - kind: InterconnectSet - listKind: InterconnectSetList - plural: interconnectsets - singular: interconnectset - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Interconnect is the Schema for the interconnect 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 - spec: - description: InterconnectSetSpec defines the desired state of InterconnectSet - properties: - replicas: - description: Number of desired interconnects. This is a pointer to - distinguish between explicit zero and not specified. Defaults to - 1. - format: int32 - type: integer - selector: - description: Label selector for interconnects. Existing ReplicaSets - whose pods are selected by this will be the ones affected by this - deployment. It must match the pod template's labels. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - template: - description: Template describes the interconnects that will be created. - properties: - metadata: - description: Standard object's metadata. - type: object - spec: - description: Specification of the desired behavior of the interconnect. - properties: - links: - description: Links define the links part of the interconnect - items: - properties: - endpoints: - description: Endpoints defines exactly 2 endpoints, - the first entry is the local endpoint, the 2nd entry - is the remote endpoint - items: - description: InterconnectLinkEndpoint - properties: - interfaceName: - type: string - nodeName: - description: NodeName provide the name of the - node on which this interconnect originates NodeName - allows for multi-homing if multiple endpoints - of a InterconnectLink reside on different nodes - type: string - selector: - description: A label selector is a label query - over a set of resources. The result of matchLabels - and matchExpressions are ANDed. An empty label - selector matches all objects. A null label selector - matches no objects. - properties: - matchExpressions: - description: matchExpressions is a list of - label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, a - key, and an operator that relates the - key and values. - properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and - DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. - If the operator is Exists or DoesNotExist, - the values array must be empty. This - array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is - "In", and the values array contains only - "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - type: object - type: array - lag: - description: Lag defines if the interconnect link is - part of a link aggregation group A link aggregation - group can be single-homed ot multi-homed based on - the endpoint node name. - type: boolean - name: - type: string - type: object - type: array - topology: - description: Topology defines the topology to which this interconnect - applies - type: string - required: - - topology - type: object - type: object - required: - - selector - - template - type: object - status: - description: InterconnectSetStatus defines the observed state of Interconnect - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/topo.nephio.org_logicalinterconnects.yaml b/examples/crd/topo.nephio.org_logicalinterconnects.yaml deleted file mode 100644 index 6eb3129..0000000 --- a/examples/crd/topo.nephio.org_logicalinterconnects.yaml +++ /dev/null @@ -1,205 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: logicalinterconnects.topo.nephio.org -spec: - group: topo.nephio.org - names: - categories: - - nephio - - inv - kind: LogicalInterconnect - listKind: LogicalInterconnectList - plural: logicalinterconnects - singular: logicalinterconnect - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: Interconnect is the Schema for the interconnect 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 - spec: - properties: - endpoints: - description: Endpoints defines exactly 2 endpoints, the first entry - is the local endpoint, the 2nd entry is the remote endpoint - items: - properties: - name: - description: Name is the name of logical endpoint. E.g. bond0 - type: string - selector: - description: we need to find a way to indicate selecting endpoints - from multiple topologies or multiple nodes within a topologies - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. This - array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - selectorPolicy: - description: SelectorPolicy defines the policy used to select - the endpoints - properties: - nodeDiversity: - description: NodeDiversity is a selection policy to select - endpoints that are node diverse NodeDiversity defines - the amount of different nodes to be used when selecting - endpoints - type: integer - type: object - topologies: - description: topologies define the topologies to which the endpoints - of the logical interconnect link belongs to This allows multi-homing - to different topologies - items: - type: string - type: array - required: - - topologies - type: object - maxItems: 2 - minItems: 2 - type: array - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - lacp: - description: lacp - type: boolean - links: - type: integer - type: - description: lag, vesi - type: string - required: - - endpoints - type: object - status: - description: LogicalInterconnectStatus defines the observed state of LogicalInterconnect - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/topo.nephio.org_rawtopologies.yaml b/examples/crd/topo.nephio.org_rawtopologies.yaml deleted file mode 100644 index 703af3a..0000000 --- a/examples/crd/topo.nephio.org_rawtopologies.yaml +++ /dev/null @@ -1,256 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: rawtopologies.topo.nephio.org -spec: - group: topo.nephio.org - names: - categories: - - nephio - - inv - kind: RawTopology - listKind: RawTopologyList - plural: rawtopologies - singular: rawtopology - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: RawTopology is the Schema for the rawTopology 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 - spec: - description: RawTopologySpec defines the desired state of RawTopology - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - links: - items: - description: LinkSpec defines the desired state of Link - properties: - endpoints: - description: Endpoints define the node + interface endpoints - associated with this link - items: - properties: - interfaceName: - description: topology defines the topology to which this - endpoint belongs Topology string `json:"topology,omitempty" - yaml:"topology,omitempty"` InterfaceName provide the - name of the interface of the endpoint - maxLength: 64 - type: string - lacpFallback: - description: LacpFallback defines if the link is part - of a lag mutually exclusive with Lag parameter - type: boolean - nodeName: - description: NodeName provide the name of the node on - which this endpoint belongs. - maxLength: 64 - type: string - topology: - description: topology defines the topology to which this - endpoint belongs - maxLength: 64 - type: string - required: - - interfaceName - - nodeName - - topology - type: object - maxItems: 2 - minItems: 2 - type: array - x-kubernetes-list-map-keys: - - topology - - nodeName - - interfaceName - x-kubernetes-list-type: map - x-kubernetes-validations: - - message: Link Endpoints are immutable - rule: self.all(element, element in oldSelf) - required: - - endpoints - type: object - type: array - location: - description: Location provider the location information where this - resource is located - properties: - latitude: - type: string - longitude: - type: string - type: object - nodes: - additionalProperties: - description: NodeSpec defines the desired state of Node - properties: - address: - description: Address defines the address of the mgmt interface - of this node - type: string - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - location: - description: Location defines the location information where - this resource is located in lon/lat coordinates - properties: - latitude: - type: string - longitude: - type: string - type: object - nodeConfig: - description: NodeConfig provides a reference to a node config - resource only name is used, we expect the namespace to be - the same as the node for now - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a valid - JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that - triggered the event) or if no container name is specified - "spec.containers[2]" (container with index 2 in this pod). - This syntax is chosen only to have some well-defined way - of referencing a part of an object. TODO: this design - is not final and this field is subject to change in the - future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - provider: - description: Topology defines the topology to which this node - belongs Topology is actually a mandatory parameter, but to - be able to reuse this struct for both rawtopology and node - CRD we allow this validation is done in the respective controllers - Topology string `json:"topology,omitempty" yaml:"topology,omitempty"` - Provider defines the provider implementing this node. - type: string - required: - - provider - type: object - description: Defaults *NodeProperties `json:"defaults,omitempty" yaml:"defaults,omitempty"` - Kinds map[string]NodeProperties `json:"kinds,omitempty" yaml:"kinds,omitempty"` - type: object - required: - - links - - nodes - type: object - status: - description: RawTopologyStatus defines the observed state of RawTopology - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/vlan.resource.nephio.org_vlanclaims.yaml b/examples/crd/vlan.resource.nephio.org_vlanclaims.yaml deleted file mode 100644 index 5a62928..0000000 --- a/examples/crd/vlan.resource.nephio.org_vlanclaims.yaml +++ /dev/null @@ -1,231 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: vlanclaims.vlan.resource.nephio.org -spec: - group: vlan.resource.nephio.org - names: - categories: - - nephio - - resource - kind: VLANClaim - listKind: VLANClaimList - plural: vlanclaims - singular: vlanclaim - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNC - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: STATUS - type: string - - jsonPath: .spec.vlanID - name: VLAN-REQ - type: string - - jsonPath: .status.vlanID - name: VLAN-ALLOC - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: VLANClaim is the Schema for the vlan claim 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 - spec: - description: VLANClaimSpec defines the desired state of VLANClaim - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - range: - description: VLANRange defines the vlan range for the VLAN claim - type: string - selector: - description: Selector defines the selector criterias - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - vlanID: - description: VLANID defines the vlan for the VLAN claim - type: integer - vlanIndex: - description: VLANIndex defines the vlan index for the VLAN Claim - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - vlanIndex - type: object - status: - description: VLANClaimStatus defines the observed state of VLANClaim - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - expiryTime: - description: ExpiryTime indicated when the claim expires - type: string - vlanID: - description: VLANID defines the vlan ID, claimed through the VLAN - backend - type: integer - vlanRange: - description: VLANRange defines the vlan range, claimed through the - VLAN backend - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/vlan.resource.nephio.org_vlanindices.yaml b/examples/crd/vlan.resource.nephio.org_vlanindices.yaml deleted file mode 100644 index 0332697..0000000 --- a/examples/crd/vlan.resource.nephio.org_vlanindices.yaml +++ /dev/null @@ -1,124 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: vlanindices.vlan.resource.nephio.org -spec: - group: vlan.resource.nephio.org - names: - categories: - - nephio - - resource - kind: VLANIndex - listKind: VLANIndexList - plural: vlanindices - singular: vlanindex - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNC - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: STATUS - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: VLANIndex is the Schema for the vlan database 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 - spec: - description: VLANIndexSpec defines the desired state of VLANIndex - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - type: object - status: - description: VLANIndexStatus defines the observed state of VLANIndex - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/vlan.resource.nephio.org_vlans.yaml b/examples/crd/vlan.resource.nephio.org_vlans.yaml deleted file mode 100644 index a717f98..0000000 --- a/examples/crd/vlan.resource.nephio.org_vlans.yaml +++ /dev/null @@ -1,183 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: vlans.vlan.resource.nephio.org -spec: - group: vlan.resource.nephio.org - names: - categories: - - nephio - - resource - kind: VLAN - listKind: VLANList - plural: vlans - singular: vlan - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNC - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: STATUS - type: string - - jsonPath: .spec.vlanID - name: VLAN-REQ - type: string - - jsonPath: .status.vlanID - name: VLAN-ALLOC - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: VLAN is the Schema for the vlan 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 - spec: - description: VLANSpec defines the desired state of VLAN - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - range: - description: VLANRange defines a range of vlans - type: string - vlanID: - description: VLANID defines the VLAN ID - type: integer - vlanIndex: - description: VLANIndex defines the vlan index for the VLAN claim - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - vlanIndex - type: object - status: - description: VLANStatus defines the observed state of VLAN - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - vlanID: - description: VLANID defines the vlan ID, claimed through the VLAN - backend - type: integer - vlanRange: - description: VLANRange defines the vlan range, claimed through the - VLAN backend - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/vxlan.resource.nephio.org_vxlanclaims.yaml b/examples/crd/vxlan.resource.nephio.org_vxlanclaims.yaml deleted file mode 100644 index 6b1f597..0000000 --- a/examples/crd/vxlan.resource.nephio.org_vxlanclaims.yaml +++ /dev/null @@ -1,222 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: vxlanclaims.vxlan.resource.nephio.org -spec: - group: vxlan.resource.nephio.org - names: - categories: - - nephio - - resource - kind: VXLANClaim - listKind: VXLANClaimList - plural: vxlanclaims - singular: vxlanclaim - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNC - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: STATUS - type: string - - jsonPath: .spec.vxlanID - name: VXLAN-REQ - type: string - - jsonPath: .status.vxlanID - name: VXLAN-ALLOC - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: VXLANClaim is the Schema for the vxlan claim 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 - spec: - description: VXLANClaimSpec defines the desired state of VXLANClaim - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - selector: - description: Selector defines the selector criterias - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - vxlanIndex: - description: VXLANIndex defines the vxlan index for the VXLAN Claim - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - x-kubernetes-map-type: atomic - required: - - vxlanIndex - type: object - status: - description: VXLANClaimStatus defines the observed state of VXLANClaim - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - expiryTime: - description: ExpiryTime indicated when the claim expires - type: string - vxlanID: - description: VXLANID defines the vxlan ID, claimed through the VXLAN - backend - format: int32 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/crd/vxlan.resource.nephio.org_vxlanindexes.yaml b/examples/crd/vxlan.resource.nephio.org_vxlanindexes.yaml deleted file mode 100644 index 567276a..0000000 --- a/examples/crd/vxlan.resource.nephio.org_vxlanindexes.yaml +++ /dev/null @@ -1,137 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.12.1 - name: vxlanindexes.vxlan.resource.nephio.org -spec: - group: vxlan.resource.nephio.org - names: - categories: - - nephio - - resource - kind: VXLANIndex - listKind: VXLANIndexList - plural: vxlanindexes - singular: vxlanindex - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNC - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: STATUS - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: VXLANIndex is the Schema for the vxlan database 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 - spec: - description: VXLANIndexSpec defines the desired state of VXLANIndex - properties: - labels: - additionalProperties: - type: string - description: Labels as user defined labels - type: object - maxEntryID: - description: MaxEntryID defines the max vxlan entry id this index - will claim - format: int32 - type: integer - offset: - description: Offset defines the offset where the vxlan index starts - to claim vxlan IDs from - format: int32 - type: integer - required: - - maxEntryID - - offset - type: object - status: - description: VXLANIndexStatus defines the observed state of VXLANIndex - properties: - conditions: - description: Conditions of the resource. - items: - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/examples/nf-test-itfce-example/KformFile.yaml b/examples/nf-test-itfce-example/KformFile.yaml index dec473f..f939465 100644 --- a/examples/nf-test-itfce-example/KformFile.yaml +++ b/examples/nf-test-itfce-example/KformFile.yaml @@ -6,13 +6,11 @@ spec: kind: module providerRequirements: kubernetes: - #source: github.com/henderiw-nephio/kform source: ghcr.io/kform-providers/kubernetes version: "0.0.1" resourcebackend: - #source: github.com/henderiw-nephio/kform source: ghcr.io/kform-providers/resourcebackend - version: "0.0.1" + version: "~>0.0.1" test: source: . info: {} diff --git a/examples/nf-test-itfce-example/input.yaml b/examples/nf-test-itfce-example/input.yaml index 7588e1d..724f990 100644 --- a/examples/nf-test-itfce-example/input.yaml +++ b/examples/nf-test-itfce-example/input.yaml @@ -31,5 +31,5 @@ data: name: vpc-ran cniType: sriov attachmentType: vlan - ipFamilyPolicy: dualstack - #ipFamilyPolicy: ipv4Only \ No newline at end of file + #ipFamilyPolicy: dualstack + ipFamilyPolicy: ipv4Only \ No newline at end of file diff --git a/examples/nf-test-itfce-example/out/interface0.yaml b/examples/nf-test-itfce-example/out/interface0.yaml index caa6b8a..90ad71d 100644 --- a/examples/nf-test-itfce-example/out/interface0.yaml +++ b/examples/nf-test-itfce-example/out/interface0.yaml @@ -5,14 +5,12 @@ metadata: spec: attachmentType: vlan cniType: sriov - ipFamilyPolicy: dualstack + ipFamilyPolicy: ipv4Only networkInstance: name: vpc-ran status: ipClaimStatus: - gateway: 10.0.0.1 prefix: 10.0.0.10/24 - - gateway: 1000::1 - prefix: 1000::2/64 vlanClaimStatus: vlanID: 10 diff --git a/go.mod b/go.mod index dbf185e..3f2b396 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d github.com/adrg/xdg v0.4.0 github.com/apparentlymart/go-versions v1.0.2 - github.com/containerd/containerd v1.7.6 github.com/dgraph-io/badger/v4 v4.2.0 github.com/docker/cli v24.0.6+incompatible github.com/golang/protobuf v1.5.3 @@ -53,12 +52,8 @@ require ( github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v24.0.6+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-metrics v0.0.1 // indirect - github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect @@ -112,8 +107,6 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect github.com/vbatts/tar-split v0.11.3 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/multierr v1.11.0 // indirect go4.org/netipx v0.0.0-20230303233057-f1b76eb4bb35 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect diff --git a/go.sum b/go.sum index cf9bec3..d72108d 100644 --- a/go.sum +++ b/go.sum @@ -78,8 +78,6 @@ github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWa github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2 h1:aBfCb7iqHmDEIp6fBvC/hQUddQfg+3qdYjwzaiP9Hnc= -github.com/distribution/distribution/v3 v3.0.0-20221208165359-362910506bc2/go.mod h1:WHNsWjnIn2V1LYOrME7e8KxSeKunYHsxEm4am0BUtcI= github.com/docker/cli v24.0.6+incompatible h1:fF+XCQCgJjjQNIMjzaSmiKJSCcfcXb3TWTcc7GAneOY= github.com/docker/cli v24.0.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= @@ -88,16 +86,6 @@ github.com/docker/docker v24.0.6+incompatible h1:hceabKCtUgDqPu+qm0NgsaXf28Ljf4/ github.com/docker/docker v24.0.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= @@ -174,8 +162,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= -github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/cel-go v0.16.1 h1:3hZfSNiAU3KOiNtxuFXVp5WFy4hf/Ly3Sa4/7F8SXNo= @@ -372,6 +358,8 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= diff --git a/tools/cmd/kform/commands/command.go b/tools/cmd/kform/commands/command.go index 071354e..88aadff 100644 --- a/tools/cmd/kform/commands/command.go +++ b/tools/cmd/kform/commands/command.go @@ -22,7 +22,7 @@ const ( defaultConfigFileName = "kform" defaultConfigFileNameExt = "yaml" defaultConfigEnvPrefix = "KFORM" - defaultDBPath = "plugins_db" + defaultDBPath = "package_db" ) var ( @@ -40,7 +40,12 @@ func GetMain(ctx context.Context) *cobra.Command { // adjust the error message coming from libraries SilenceErrors: true, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { - // create plugin store if it does not exist + // initialize viper + // ensure the viper config directory exists + cobra.CheckErr(fsys.EnsureDir(ctx, xdg.ConfigHome, defaultConfigFileSubDir)) + // initialize viper settings + initConfig() + // create package store if it does not exist _, err := store.New(cmd.Context(), filepath.Join(xdg.ConfigHome, defaultConfigFileSubDir, defaultDBPath)) return err @@ -56,11 +61,6 @@ func GetMain(ctx context.Context) *cobra.Command { return cmd.Usage() }, } - // ensure the viper config directory exists - - cobra.CheckErr(fsys.EnsureDir(ctx, xdg.ConfigHome, defaultConfigFileSubDir)) - // initialize viper settings - cobra.OnInitialize(initConfig) cmd.AddCommand(initcmd.NewCommand(ctx, version)) cmd.AddCommand(apply.NewCommand(ctx, version)) @@ -73,7 +73,7 @@ func GetMain(ctx context.Context) *cobra.Command { type Runner struct { Command *cobra.Command - Ctx context.Context + //Ctx context.Context } // initConfig reads in config file and ENV variables if set. diff --git a/tools/pkg/fsys/fileutil.go b/tools/pkg/fsys/fileutil.go index 77aeb83..8778bcc 100644 --- a/tools/pkg/fsys/fileutil.go +++ b/tools/pkg/fsys/fileutil.go @@ -25,7 +25,7 @@ func ValidateDirPath(path string) error { func EnsureDir(ctx context.Context, elems ...string) error { log := log.FromContext(ctx) fp := filepath.Join(elems...) - log.Info("ensure dir", "path", fp) + //log.Info("ensure dir", "path", fp) fpInfo, err := os.Stat(fp) if err != nil { if err := os.MkdirAll(fp, 0755); err != nil { diff --git a/tools/pkg/store/badgerdb.go b/tools/pkg/store/badgerdb.go index 8059db9..8047226 100644 --- a/tools/pkg/store/badgerdb.go +++ b/tools/pkg/store/badgerdb.go @@ -31,7 +31,7 @@ func (d *badgerDBStore) Get(ctx context.Context, p Plugin) ([]byte, error) { return nil, err } p.Tags = nil // Get ignores tags (for now) - k := d.buildKey(p) + k := buildKey(p) var v []byte err = d.db.View(func(txn *badger.Txn) error { @@ -58,7 +58,7 @@ func (d *badgerDBStore) Save(ctx context.Context, p Plugin, v []byte) error { if err != nil { return err } - k := d.buildKey(p) + k := buildKey(p) return d.db.Update(func(txn *badger.Txn) error { return txn.Set(k, v) }) @@ -69,7 +69,7 @@ func (d *badgerDBStore) Delete(ctx context.Context, p Plugin) error { if err != nil { return err } - k := d.buildKey(p) + k := buildKey(p) return d.db.Update(func(txn *badger.Txn) error { return txn.Delete(k) }) @@ -198,7 +198,7 @@ func (d *badgerDBStore) listProjects() ([]string, error) { // | | l | project | l | name | l | version | l | os | l | arch | l | tag1 | l | tag1 | .... // | +-------------+----------+-------------+--------+----------+----------+----------+----- // +---------------------------------------------------------------------------------------- -func (d *badgerDBStore) buildKey(p Plugin) []byte { +func buildKey(p Plugin) []byte { b := new(bytes.Buffer) // project b.Write(buildKeyItem(p.Project)) diff --git a/tools/pkg/syntax/address/address.go b/tools/pkg/syntax/address/address.go index 42d5d8b..759bf2e 100644 --- a/tools/pkg/syntax/address/address.go +++ b/tools/pkg/syntax/address/address.go @@ -10,14 +10,14 @@ import ( ) /* -https://github.com/henderiw-nephio/kform/releases/download/v0.0.1/provider-kubernetes_0.0.1_darwin_amd64 +https://github.com/henderiw-nephio/kform/releases/download/v0.0.1/kubernetes_darwin_amd64 europe-docker.pkg.dev/srlinux/eu.gcr.io/provider-xxxx github.com/henderiw-nephio/kform/provider-xxxx */ -// .kform/providers/github.com/henderiw-nephio_kform/kubernetes/0.0.1/darwin_arm64/ -// .kform/providers/kubernetes/ -// .kform/providers////// +// .kform/providers/github.com/henderiw-nephio_kform/kubernetes/0.0.1/darwin_arm64/ +// .kform/providers/local/kubernetes/ +// .kform/providers////// // type Address struct { @@ -137,14 +137,14 @@ func (r *Package) BasePath() string { } func (r *Package) ExecPath() string { - return filepath.Join(r.Address.Path(), r.SelectedVersion, r.Platform.String(), r.Filename(), "image", r.Address.Name) + return filepath.Join(r.Address.Path(), r.SelectedVersion, r.Platform.String(), "image", r.Address.Name) } func (r *Package) FilePath(version string) string { if r.Address.IsLocal() { - return filepath.Join(r.Address.Path(), r.Filename()) + return filepath.Join(r.Address.Path()) } - return filepath.Join(r.Address.Path(), version, r.Platform.String(), r.Filename()) + return filepath.Join(r.Address.Path(), version, r.Platform.String()) } func (r *Package) FilePathWithSelectedVersion() string { diff --git a/tools/pkg/syntax/address/release.go b/tools/pkg/syntax/address/release.go index 50066d4..cfb1302 100644 --- a/tools/pkg/syntax/address/release.go +++ b/tools/pkg/syntax/address/release.go @@ -40,7 +40,6 @@ func (r *Release) GetImageData(ctx context.Context) (Images, error) { } images = append(images, Image{ Name: asset.Name, - //Version: split[1], Platform: Platform{ OS: split[1], Arch: split[2], @@ -51,6 +50,3 @@ func (r *Release) GetImageData(ctx context.Context) (Images, error) { } return images, nil } - -//"content_type": "application/octet-stream", -// "state": "uploaded",