kube_schema 1.4.3 → 1.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ # Schema Versions
2
+
3
+ This guide covers working with different Kubernetes schema versions.
4
+
5
+ ## Bundled Schemas
6
+
7
+ Bundled schemas ship with the gem for Kubernetes 1.19 through 1.35. Updated automatically via CI.
8
+
9
+ ## Setting a Version
10
+
11
+ ```ruby
12
+ Kube::Schema.schema_version = "1.31"
13
+ Kube::Schema["Deployment"] # uses 1.31
14
+ ```
15
+
16
+ ## Discovery
17
+
18
+ ```ruby
19
+ Kube::Schema.schema_versions # => ["1.19", "1.20", ..., "1.35"]
20
+ Kube::Schema.latest_version # => "1.35"
21
+
22
+ Kube::Schema["1.34"].list_resources
23
+ # => ["Binding", "CSIDriver", "ConfigMap", "Deployment", ...]
24
+ ```
25
+
26
+ ## Version-Specific Access
27
+
28
+ ```ruby
29
+ Kube::Schema["1.34"]["Deployment"]
30
+ Kube::Schema["1.31"]["Pod"]
31
+ ```
@@ -0,0 +1,31 @@
1
+ # Validation
2
+
3
+ This guide covers schema validation against the full Kubernetes OpenAPI spec.
4
+
5
+ ## Basic Validation
6
+
7
+ ```ruby
8
+ deploy.valid? # => true
9
+
10
+ bad = Kube::Schema["Deployment"].new {
11
+ self.apiVersion = 12345
12
+ }
13
+
14
+ bad.valid? # => false
15
+
16
+ bad.valid!
17
+ # Kube::ValidationError: Schema validation failed for Deployment:
18
+ # - apiVersion = 12345 -- expected string, got Integer
19
+ ```
20
+
21
+ ## Serialization Safety
22
+
23
+ `to_yaml` refuses to serialize invalid resources:
24
+
25
+ ```ruby
26
+ bad.to_yaml # raises Kube::ValidationError
27
+ ```
28
+
29
+ ## Error Messages
30
+
31
+ Validation errors render annotated YAML with color-coded diagnostics. Error lines are highlighted in red, missing required keys are injected inline, and each problem gets a clear explanation.
data/kube_schema.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.metadata["homepage_uri"] = spec.homepage
22
22
  spec.metadata["source_code_uri"] = spec.homepage
23
- spec.metadata["documentation_uri"] = spec.homepage
23
+ spec.metadata["documentation_uri"] = "https://general-intelligence-systems.github.io/kube_schema/"
24
24
  spec.metadata["rubygems_mfa_required"] = "true"
25
25
 
26
26
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -33,4 +33,22 @@ class Hash
33
33
  def self.vivify(&block)
34
34
  new.tap { |h| h.instance_exec(&block) }
35
35
  end
36
+
37
+ # Deep-stringify keys so symbol keys don't leak into YAML as `:key:`.
38
+ def to_yaml(*)
39
+ Hash._deep_stringify_keys(self).then { |h| Psych.dump(h) }
40
+ end
41
+
42
+ def self._deep_stringify_keys(obj)
43
+ case obj
44
+ when Hash
45
+ obj.each_with_object({}) do |(k, v), result|
46
+ result[k.to_s] = _deep_stringify_keys(v)
47
+ end
48
+ when Array
49
+ obj.map { |v| _deep_stringify_keys(v) }
50
+ else
51
+ obj
52
+ end
53
+ end
36
54
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kube
4
4
  module Schema
5
- VERSION = "1.4.3"
5
+ VERSION = "1.4.5"
6
6
  end
7
7
  end
data/readme.md ADDED
@@ -0,0 +1,28 @@
1
+ # kube_schema
2
+
3
+ Ruby objects for every Kubernetes resource. Validated against the real OpenAPI spec. No YAML. No hash literals. Just Ruby blocks that know their schema.
4
+
5
+ ## Usage
6
+
7
+ Please see the [project documentation](https://general-intelligence-systems.github.io/kube_schema/) for more details.
8
+
9
+ - [Getting Started](https://general-intelligence-systems.github.io/kube_schema/guides/getting-started/index) - This guide walks you through installing kube_schema and creating your first Kubernetes resource object.
10
+
11
+ - [The Block DSL](https://general-intelligence-systems.github.io/kube_schema/guides/block-dsl/index) - This guide covers the block DSL for defining Kubernetes resources with nested attributes.
12
+
13
+ - [Validation](https://general-intelligence-systems.github.io/kube_schema/guides/validation/index) - This guide covers schema validation against the full Kubernetes OpenAPI spec.
14
+
15
+ - [Manifests](https://general-intelligence-systems.github.io/kube_schema/guides/manifests/index) - This guide covers grouping resources into multi-document YAML manifests.
16
+
17
+ - [Schema Versions](https://general-intelligence-systems.github.io/kube_schema/guides/schema-versions/index) - This guide covers working with different Kubernetes schema versions.
18
+
19
+ ## Related Projects
20
+
21
+ - [kube_cluster](https://github.com/general-intelligence-systems/kube_cluster) -- OOP resource management with dirty tracking and persistence
22
+ - [kube_kubectl](https://github.com/general-intelligence-systems/kube_ctl) -- Ruby DSL that compiles to kubectl and helm commands
23
+ - [kube_kit](https://github.com/general-intelligence-systems/kube_kit) -- Generators for kube_cluster projects
24
+ - [kube_engine](https://github.com/general-intelligence-systems/kube_engine) -- Kubernetes engine
25
+
26
+ ## License
27
+
28
+ Apache-2.0
@@ -233115,7 +233115,7 @@
233115
233115
  "type": "boolean"
233116
233116
  },
233117
233117
  "procMount": {
233118
- "description": "procMount denotes the type of proc mount to use for the containers.\nThe default value is Default which uses the container runtime defaults for\nreadonly paths and masked paths.\nThis requires the ProcMountType feature flag to be enabled.\nNote that this field cannot be set when spec.os.name is windows.",
233118
+ "description": "procMount denotes the type of proc mount to use for the containers.\nThe default value is Default which uses the container runtime defaults for\nreadonly paths and masked paths.\nNote that this field cannot be set when spec.os.name is windows.",
233119
233119
  "type": "string"
233120
233120
  },
233121
233121
  "readOnlyRootFilesystem": {
@@ -238016,7 +238016,7 @@
238016
238016
  "type": "boolean"
238017
238017
  },
238018
238018
  "procMount": {
238019
- "description": "procMount denotes the type of proc mount to use for the containers.\nThe default value is Default which uses the container runtime defaults for\nreadonly paths and masked paths.\nThis requires the ProcMountType feature flag to be enabled.\nNote that this field cannot be set when spec.os.name is windows.",
238019
+ "description": "procMount denotes the type of proc mount to use for the containers.\nThe default value is Default which uses the container runtime defaults for\nreadonly paths and masked paths.\nNote that this field cannot be set when spec.os.name is windows.",
238020
238020
  "type": "string"
238021
238021
  },
238022
238022
  "readOnlyRootFilesystem": {
@@ -239294,7 +239294,7 @@
239294
239294
  "type": "boolean"
239295
239295
  },
239296
239296
  "procMount": {
239297
- "description": "procMount denotes the type of proc mount to use for the containers.\nThe default value is Default which uses the container runtime defaults for\nreadonly paths and masked paths.\nThis requires the ProcMountType feature flag to be enabled.\nNote that this field cannot be set when spec.os.name is windows.",
239297
+ "description": "procMount denotes the type of proc mount to use for the containers.\nThe default value is Default which uses the container runtime defaults for\nreadonly paths and masked paths.\nNote that this field cannot be set when spec.os.name is windows.",
239298
239298
  "type": "string"
239299
239299
  },
239300
239300
  "readOnlyRootFilesystem": {
@@ -239660,7 +239660,7 @@
239660
239660
  "type": "boolean"
239661
239661
  },
239662
239662
  "hostUsers": {
239663
- "description": "Use the host's user namespace.\nOptional: Default to true.\nIf set to true or not present, the pod will be run in the host user namespace, useful\nfor when the pod needs a feature only available to the host user namespace, such as\nloading a kernel module with CAP_SYS_MODULE.\nWhen set to false, a new userns is created for the pod. Setting false is useful for\nmitigating container breakout vulnerabilities even allowing users to run their\ncontainers as root without actually having root privileges on the host.\nThis field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.",
239663
+ "description": "Use the host's user namespace.\nOptional: Default to true.\nIf set to true or not present, the pod will be run in the host user namespace, useful\nfor when the pod needs a feature only available to the host user namespace, such as\nloading a kernel module with CAP_SYS_MODULE.\nWhen set to false, a new userns is created for the pod. Setting false is useful for\nmitigating container breakout vulnerabilities even allowing users to run their\ncontainers as root without actually having root privileges on the host.",
239664
239664
  "type": "boolean"
239665
239665
  },
239666
239666
  "hostname": {
@@ -240599,7 +240599,7 @@
240599
240599
  "type": "boolean"
240600
240600
  },
240601
240601
  "procMount": {
240602
- "description": "procMount denotes the type of proc mount to use for the containers.\nThe default value is Default which uses the container runtime defaults for\nreadonly paths and masked paths.\nThis requires the ProcMountType feature flag to be enabled.\nNote that this field cannot be set when spec.os.name is windows.",
240602
+ "description": "procMount denotes the type of proc mount to use for the containers.\nThe default value is Default which uses the container runtime defaults for\nreadonly paths and masked paths.\nNote that this field cannot be set when spec.os.name is windows.",
240603
240603
  "type": "string"
240604
240604
  },
240605
240605
  "readOnlyRootFilesystem": {
@@ -240987,7 +240987,7 @@
240987
240987
  "description": "ResourceClaims defines which ResourceClaims must be allocated\nand reserved before the Pod is allowed to start. The resources\nwill be made available to those containers which consume them\nby name.\n\nThis is a stable field but requires that the\nDynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.",
240988
240988
  "type": "array",
240989
240989
  "items": {
240990
- "description": "PodResourceClaim references exactly one ResourceClaim, either directly\nor by naming a ResourceClaimTemplate which is then turned into a ResourceClaim\nfor the pod.\n\nIt adds a name to it that uniquely identifies the ResourceClaim inside the Pod.\nContainers that need access to the ResourceClaim reference it with this name.",
240990
+ "description": "PodResourceClaim references exactly one ResourceClaim, either directly\nor by naming a ResourceClaimTemplate which is then turned into a ResourceClaim\nfor the pod.\n\nIt adds a name to it that uniquely identifies the ResourceClaim inside the Pod.\nContainers that need access to the ResourceClaim reference it with this name.\n\nWhen the DRAWorkloadResourceClaims feature gate is enabled and this Pod\nbelongs to a PodGroup, a PodResourceClaim is matched to a\nPodGroupResourceClaim if all of their fields are equal (Name,\nResourceClaimName, and ResourceClaimTemplateName). A matched claim references\na single ResourceClaim shared across all Pods in the PodGroup, reserved for\nthe PodGroup in ResourceClaimStatus.ReservedFor rather than for individual\nPods.",
240991
240991
  "type": "object",
240992
240992
  "required": [
240993
240993
  "name"
@@ -241002,7 +241002,7 @@
241002
241002
  "type": "string"
241003
241003
  },
241004
241004
  "resourceClaimTemplateName": {
241005
- "description": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate\nobject in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will\nbe bound to this pod. When this pod is deleted, the ResourceClaim\nwill also be deleted. The pod name and resource name, along with a\ngenerated component, will be used to form a unique name for the\nResourceClaim, which will be recorded in pod.status.resourceClaimStatuses.\n\nThis field is immutable and no changes will be made to the\ncorresponding ResourceClaim by the control plane after creating the\nResourceClaim.\n\nExactly one of ResourceClaimName and ResourceClaimTemplateName must\nbe set.",
241005
+ "description": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate\nobject in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will\nbe bound to this pod. When this pod is deleted, the ResourceClaim\nwill also be deleted. The pod name and resource name, along with a\ngenerated component, will be used to form a unique name for the\nResourceClaim, which will be recorded in pod.status.resourceClaimStatuses.\n\nWhen the DRAWorkloadResourceClaims feature gate is enabled and the pod\nbelongs to a PodGroup that defines a PodGroupResourceClaim with the same\nName and ResourceClaimTemplateName, this PodResourceClaim resolves to the\nResourceClaim generated for the PodGroup. All pods in the group that\ndefine an equivalent PodResourceClaim matching the\nPodGroupResourceClaim's Name and ResourceClaimTemplateName share the same\ngenerated ResourceClaim. ResourceClaims generated for a PodGroup are\nowned by the PodGroup and their lifecycles are tied to the PodGroup\ninstead of any individual pod.\n\nThis field is immutable and no changes will be made to the\ncorresponding ResourceClaim by the control plane after creating the\nResourceClaim.\n\nExactly one of ResourceClaimName and ResourceClaimTemplateName must\nbe set.",
241006
241006
  "type": "string"
241007
241007
  }
241008
241008
  }
@@ -241092,6 +241092,16 @@
241092
241092
  ],
241093
241093
  "x-kubernetes-list-type": "map"
241094
241094
  },
241095
+ "schedulingGroup": {
241096
+ "description": "SchedulingGroup provides a reference to the immediate scheduling runtime\ngrouping object that this Pod belongs to.\nThis field is used by the scheduler to identify the group and apply the\ncorrect group scheduling policies. The association with a group also\nimpacts other lifecycle aspects of a Pod that are relevant in a wider context\nof scheduling like preemption, resource attachment, etc. If not specified,\nthe Pod is treated as a single unit in all of these aspects.\nThe group object referenced by this field may not exist at the time the\nPod is created.\nThis field is immutable, but a group object with the same name may be\nrecreated with different policies. Doing this during pod scheduling\nmay result in the placement not conforming to the expected policies.",
241097
+ "type": "object",
241098
+ "properties": {
241099
+ "podGroupName": {
241100
+ "description": "PodGroupName specifies the name of the standalone PodGroup object\nthat represents the runtime instance of this group.\nMust be a DNS subdomain.",
241101
+ "type": "string"
241102
+ }
241103
+ }
241104
+ },
241095
241105
  "securityContext": {
241096
241106
  "description": "SecurityContext holds pod-level security attributes and common container settings.\nOptional: Defaults to empty. See type description for default values of each field.",
241097
241107
  "type": "object",
@@ -242080,7 +242090,7 @@
242080
242090
  }
242081
242091
  },
242082
242092
  "image": {
242083
- "description": "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine.\nThe volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails.\n- Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present.\n- IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation.\nA failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.\nThe types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.\nThe OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.\nThe volume will be mounted read-only (ro) and non-executable files (noexec).\nSub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.\nThe field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.",
242093
+ "description": "image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine.\nThe volume is resolved at pod startup depending on which PullPolicy value is provided:\n\n- Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails.\n- Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present.\n- IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.\n\nThe volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation.\nA failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.\nThe types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.\nThe OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.\nThe volume will be mounted read-only (ro).\nSub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33.\nThe field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.",
242084
242094
  "type": "object",
242085
242095
  "properties": {
242086
242096
  "pullPolicy": {
@@ -242221,7 +242231,7 @@
242221
242231
  }
242222
242232
  },
242223
242233
  "portworxVolume": {
242224
- "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine.\nDeprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type\nare redirected to the pxd.portworx.com CSI driver when the CSIMigrationPortworx feature-gate\nis on.",
242234
+ "description": "portworxVolume represents a portworx volume attached and mounted on kubelets host machine.\nDeprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type\nare redirected to the pxd.portworx.com CSI driver.",
242225
242235
  "type": "object",
242226
242236
  "required": [
242227
242237
  "volumeID"
@@ -242809,28 +242819,6 @@
242809
242819
  "name"
242810
242820
  ],
242811
242821
  "x-kubernetes-list-type": "map"
242812
- },
242813
- "workloadRef": {
242814
- "description": "WorkloadRef provides a reference to the Workload object that this Pod belongs to.\nThis field is used by the scheduler to identify the PodGroup and apply the\ncorrect group scheduling policies. The Workload object referenced\nby this field may not exist at the time the Pod is created.\nThis field is immutable, but a Workload object with the same name\nmay be recreated with different policies. Doing this during pod scheduling\nmay result in the placement not conforming to the expected policies.",
242815
- "type": "object",
242816
- "required": [
242817
- "name",
242818
- "podGroup"
242819
- ],
242820
- "properties": {
242821
- "name": {
242822
- "description": "Name defines the name of the Workload object this Pod belongs to.\nWorkload must be in the same namespace as the Pod.\nIf it doesn't match any existing Workload, the Pod will remain unschedulable\nuntil a Workload object is created and observed by the kube-scheduler.\nIt must be a DNS subdomain.",
242823
- "type": "string"
242824
- },
242825
- "podGroup": {
242826
- "description": "PodGroup is the name of the PodGroup within the Workload that this Pod\nbelongs to. If it doesn't match any existing PodGroup within the Workload,\nthe Pod will remain unschedulable until the Workload object is recreated\nand observed by the kube-scheduler. It must be a DNS label.",
242827
- "type": "string"
242828
- },
242829
- "podGroupReplicaKey": {
242830
- "description": "PodGroupReplicaKey specifies the replica key of the PodGroup to which this\nPod belongs. It is used to distinguish pods belonging to different replicas\nof the same pod group. The pod group policy is applied separately to each replica.\nWhen set, it must be a DNS label.",
242831
- "type": "string"
242832
- }
242833
- }
242834
242822
  }
242835
242823
  }
242836
242824
  }
@@ -254672,14 +254660,13 @@
254672
254660
  "description": "Pulumi configures this store to sync secrets using the Pulumi provider",
254673
254661
  "type": "object",
254674
254662
  "required": [
254675
- "accessToken",
254676
254663
  "environment",
254677
254664
  "organization",
254678
254665
  "project"
254679
254666
  ],
254680
254667
  "properties": {
254681
254668
  "accessToken": {
254682
- "description": "AccessToken is the access tokens to sign in to the Pulumi Cloud Console.",
254669
+ "description": "AccessToken is the access tokens to sign in to the Pulumi Cloud Console.\n\nDeprecated: Use auth.accessToken instead.",
254683
254670
  "type": "object",
254684
254671
  "properties": {
254685
254672
  "secretRef": {
@@ -254715,6 +254702,101 @@
254715
254702
  "description": "APIURL is the URL of the Pulumi API.",
254716
254703
  "type": "string"
254717
254704
  },
254705
+ "auth": {
254706
+ "description": "Auth configures how the Operator authenticates with the Pulumi API.\nEither auth or the deprecated accessToken field must be specified.",
254707
+ "type": "object",
254708
+ "properties": {
254709
+ "accessToken": {
254710
+ "description": "AccessToken authenticates using a Pulumi access token stored in a Kubernetes Secret.",
254711
+ "type": "object",
254712
+ "properties": {
254713
+ "secretRef": {
254714
+ "description": "SecretRef is a reference to a secret containing the Pulumi API token.",
254715
+ "type": "object",
254716
+ "properties": {
254717
+ "key": {
254718
+ "description": "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required.",
254719
+ "type": "string",
254720
+ "maxLength": 253,
254721
+ "minLength": 1,
254722
+ "pattern": "^[-._a-zA-Z0-9]+$"
254723
+ },
254724
+ "name": {
254725
+ "description": "The name of the Secret resource being referred to.",
254726
+ "type": "string",
254727
+ "maxLength": 253,
254728
+ "minLength": 1,
254729
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
254730
+ },
254731
+ "namespace": {
254732
+ "description": "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.",
254733
+ "type": "string",
254734
+ "maxLength": 63,
254735
+ "minLength": 1,
254736
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
254737
+ }
254738
+ }
254739
+ }
254740
+ }
254741
+ },
254742
+ "oidcConfig": {
254743
+ "description": "OIDCConfig authenticates using Kubernetes ServiceAccount tokens via OIDC.",
254744
+ "type": "object",
254745
+ "required": [
254746
+ "organization",
254747
+ "serviceAccountRef"
254748
+ ],
254749
+ "properties": {
254750
+ "expirationSeconds": {
254751
+ "description": "ExpirationSeconds sets the token validity duration for service account and OIDC token.\nDefaults to 10 minutes.",
254752
+ "type": "integer",
254753
+ "format": "int64",
254754
+ "minimum": 600
254755
+ },
254756
+ "organization": {
254757
+ "description": "Organization is the name of the Pulumi organization configured for OIDC authentication.",
254758
+ "type": "string"
254759
+ },
254760
+ "serviceAccountRef": {
254761
+ "description": "ServiceAccountRef specifies the Kubernetes ServiceAccount to use for authentication.",
254762
+ "type": "object",
254763
+ "required": [
254764
+ "name"
254765
+ ],
254766
+ "properties": {
254767
+ "audiences": {
254768
+ "description": "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list",
254769
+ "type": "array",
254770
+ "items": {
254771
+ "type": "string"
254772
+ }
254773
+ },
254774
+ "name": {
254775
+ "description": "The name of the ServiceAccount resource being referred to.",
254776
+ "type": "string",
254777
+ "maxLength": 253,
254778
+ "minLength": 1,
254779
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
254780
+ },
254781
+ "namespace": {
254782
+ "description": "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.",
254783
+ "type": "string",
254784
+ "maxLength": 63,
254785
+ "minLength": 1,
254786
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
254787
+ }
254788
+ }
254789
+ }
254790
+ }
254791
+ }
254792
+ },
254793
+ "x-kubernetes-validations": [
254794
+ {
254795
+ "message": "Exactly one of 'accessToken' or 'oidcConfig' must be specified",
254796
+ "rule": "(has(self.accessToken) && !has(self.oidcConfig)) || (!has(self.accessToken) && has(self.oidcConfig))"
254797
+ }
254798
+ ]
254799
+ },
254718
254800
  "environment": {
254719
254801
  "description": "Environment are YAML documents composed of static key-value pairs, programmatic expressions,\ndynamically retrieved values from supported providers including all major clouds,\nand other Pulumi ESC environments.\nTo create a new environment, visit https://www.pulumi.com/docs/esc/environments/ for more information.",
254720
254802
  "type": "string"
@@ -254727,7 +254809,13 @@
254727
254809
  "description": "Project is the name of the Pulumi ESC project the environment belongs to.",
254728
254810
  "type": "string"
254729
254811
  }
254730
- }
254812
+ },
254813
+ "x-kubernetes-validations": [
254814
+ {
254815
+ "message": "Exactly one of 'auth' or deprecated 'accessToken' must be specified",
254816
+ "rule": "(has(self.auth) && !has(self.accessToken)) || (!has(self.auth) && has(self.accessToken))"
254817
+ }
254818
+ ]
254731
254819
  },
254732
254820
  "scaleway": {
254733
254821
  "description": "Scaleway configures this store to sync secrets using the Scaleway provider.",
@@ -261918,14 +262006,13 @@
261918
262006
  "description": "Pulumi configures this store to sync secrets using the Pulumi provider",
261919
262007
  "type": "object",
261920
262008
  "required": [
261921
- "accessToken",
261922
262009
  "environment",
261923
262010
  "organization",
261924
262011
  "project"
261925
262012
  ],
261926
262013
  "properties": {
261927
262014
  "accessToken": {
261928
- "description": "AccessToken is the access tokens to sign in to the Pulumi Cloud Console.",
262015
+ "description": "AccessToken is the access tokens to sign in to the Pulumi Cloud Console.\n\nDeprecated: Use auth.accessToken instead.",
261929
262016
  "type": "object",
261930
262017
  "properties": {
261931
262018
  "secretRef": {
@@ -261961,6 +262048,101 @@
261961
262048
  "description": "APIURL is the URL of the Pulumi API.",
261962
262049
  "type": "string"
261963
262050
  },
262051
+ "auth": {
262052
+ "description": "Auth configures how the Operator authenticates with the Pulumi API.\nEither auth or the deprecated accessToken field must be specified.",
262053
+ "type": "object",
262054
+ "properties": {
262055
+ "accessToken": {
262056
+ "description": "AccessToken authenticates using a Pulumi access token stored in a Kubernetes Secret.",
262057
+ "type": "object",
262058
+ "properties": {
262059
+ "secretRef": {
262060
+ "description": "SecretRef is a reference to a secret containing the Pulumi API token.",
262061
+ "type": "object",
262062
+ "properties": {
262063
+ "key": {
262064
+ "description": "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required.",
262065
+ "type": "string",
262066
+ "maxLength": 253,
262067
+ "minLength": 1,
262068
+ "pattern": "^[-._a-zA-Z0-9]+$"
262069
+ },
262070
+ "name": {
262071
+ "description": "The name of the Secret resource being referred to.",
262072
+ "type": "string",
262073
+ "maxLength": 253,
262074
+ "minLength": 1,
262075
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
262076
+ },
262077
+ "namespace": {
262078
+ "description": "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.",
262079
+ "type": "string",
262080
+ "maxLength": 63,
262081
+ "minLength": 1,
262082
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
262083
+ }
262084
+ }
262085
+ }
262086
+ }
262087
+ },
262088
+ "oidcConfig": {
262089
+ "description": "OIDCConfig authenticates using Kubernetes ServiceAccount tokens via OIDC.",
262090
+ "type": "object",
262091
+ "required": [
262092
+ "organization",
262093
+ "serviceAccountRef"
262094
+ ],
262095
+ "properties": {
262096
+ "expirationSeconds": {
262097
+ "description": "ExpirationSeconds sets the token validity duration for service account and OIDC token.\nDefaults to 10 minutes.",
262098
+ "type": "integer",
262099
+ "format": "int64",
262100
+ "minimum": 600
262101
+ },
262102
+ "organization": {
262103
+ "description": "Organization is the name of the Pulumi organization configured for OIDC authentication.",
262104
+ "type": "string"
262105
+ },
262106
+ "serviceAccountRef": {
262107
+ "description": "ServiceAccountRef specifies the Kubernetes ServiceAccount to use for authentication.",
262108
+ "type": "object",
262109
+ "required": [
262110
+ "name"
262111
+ ],
262112
+ "properties": {
262113
+ "audiences": {
262114
+ "description": "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list",
262115
+ "type": "array",
262116
+ "items": {
262117
+ "type": "string"
262118
+ }
262119
+ },
262120
+ "name": {
262121
+ "description": "The name of the ServiceAccount resource being referred to.",
262122
+ "type": "string",
262123
+ "maxLength": 253,
262124
+ "minLength": 1,
262125
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
262126
+ },
262127
+ "namespace": {
262128
+ "description": "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.",
262129
+ "type": "string",
262130
+ "maxLength": 63,
262131
+ "minLength": 1,
262132
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
262133
+ }
262134
+ }
262135
+ }
262136
+ }
262137
+ }
262138
+ },
262139
+ "x-kubernetes-validations": [
262140
+ {
262141
+ "message": "Exactly one of 'accessToken' or 'oidcConfig' must be specified",
262142
+ "rule": "(has(self.accessToken) && !has(self.oidcConfig)) || (!has(self.accessToken) && has(self.oidcConfig))"
262143
+ }
262144
+ ]
262145
+ },
261964
262146
  "environment": {
261965
262147
  "description": "Environment are YAML documents composed of static key-value pairs, programmatic expressions,\ndynamically retrieved values from supported providers including all major clouds,\nand other Pulumi ESC environments.\nTo create a new environment, visit https://www.pulumi.com/docs/esc/environments/ for more information.",
261966
262148
  "type": "string"
@@ -261973,7 +262155,13 @@
261973
262155
  "description": "Project is the name of the Pulumi ESC project the environment belongs to.",
261974
262156
  "type": "string"
261975
262157
  }
261976
- }
262158
+ },
262159
+ "x-kubernetes-validations": [
262160
+ {
262161
+ "message": "Exactly one of 'auth' or deprecated 'accessToken' must be specified",
262162
+ "rule": "(has(self.auth) && !has(self.accessToken)) || (!has(self.auth) && has(self.accessToken))"
262163
+ }
262164
+ ]
261977
262165
  },
261978
262166
  "scaleway": {
261979
262167
  "description": "Scaleway configures this store to sync secrets using the Scaleway provider.",
@@ -1526,7 +1526,7 @@
1526
1526
  ],
1527
1527
  "properties": {
1528
1528
  "claimName": {
1529
- "description": "ClaimName needs to be provided from the list vmi.spec.resourceClaims[].name where this device is allocated",
1529
+ "description": "ClaimName references the name of an entry in the VMI's spec.resourceClaims[] array. The referenced entry may use either resourceClaimName or resourceClaimTemplateName.",
1530
1530
  "type": "string"
1531
1531
  },
1532
1532
  "deviceName": {
@@ -1539,7 +1539,7 @@
1539
1539
  "default": ""
1540
1540
  },
1541
1541
  "requestName": {
1542
- "description": "RequestName needs to be provided from resourceClaim.spec.devices.requests[].name where this device is requested",
1542
+ "description": "RequestName specifies which request from the ResourceClaim/ResourceClaimTemplate spec.devices.requests array this claim request corresponds to.",
1543
1543
  "type": "string"
1544
1544
  },
1545
1545
  "tag": {
@@ -1632,7 +1632,7 @@
1632
1632
  ],
1633
1633
  "properties": {
1634
1634
  "claimName": {
1635
- "description": "ClaimName needs to be provided from the list vmi.spec.resourceClaims[].name where this device is allocated",
1635
+ "description": "ClaimName references the name of an entry in the VMI's spec.resourceClaims[] array. The referenced entry may use either resourceClaimName or resourceClaimTemplateName.",
1636
1636
  "type": "string"
1637
1637
  },
1638
1638
  "deviceName": {
@@ -1644,7 +1644,7 @@
1644
1644
  "default": ""
1645
1645
  },
1646
1646
  "requestName": {
1647
- "description": "RequestName needs to be provided from resourceClaim.spec.devices.requests[].name where this device is requested",
1647
+ "description": "RequestName specifies which request from the ResourceClaim/ResourceClaimTemplate spec.devices.requests array this claim request corresponds to.",
1648
1648
  "type": "string"
1649
1649
  },
1650
1650
  "tag": {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kube_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan K
@@ -91,6 +91,7 @@ extra_rdoc_files: []
91
91
  files:
92
92
  - ".envrc"
93
93
  - ".github/workflows/convert-schemas.yml"
94
+ - ".github/workflows/gh-pages.yml"
94
95
  - ".github/workflows/update-crds-catalog.yml"
95
96
  - ".github/workflows/update-schema-index.yml"
96
97
  - ".github/workflows/update-schemas.yml"
@@ -98,7 +99,7 @@ files:
98
99
  - ".rubocop.yml"
99
100
  - Gemfile
100
101
  - Gemfile.lock
101
- - README.md
102
+ - LICENSE
102
103
  - Rakefile
103
104
  - assets/validation-error.png
104
105
  - bin/console
@@ -117,6 +118,12 @@ files:
117
118
  - examples/vcluster.rb
118
119
  - flake.lock
119
120
  - flake.nix
121
+ - guides/block-dsl/readme.md
122
+ - guides/getting-started/readme.md
123
+ - guides/links.yaml
124
+ - guides/manifests/readme.md
125
+ - guides/schema-versions/readme.md
126
+ - guides/validation/readme.md
120
127
  - kube_schema.gemspec
121
128
  - lib/kube/errors.rb
122
129
  - lib/kube/monkey_patches.rb
@@ -127,6 +134,7 @@ files:
127
134
  - lib/kube/schema/sub_spec.rb
128
135
  - lib/kube/schema/version.rb
129
136
  - lib/kube/schema/version.rb.erb
137
+ - readme.md
130
138
  - schemas/crd-definitions.json
131
139
  - schemas/kubevirt-definitions.json
132
140
  - schemas/loft-definitions.json
@@ -144,7 +152,7 @@ licenses:
144
152
  metadata:
145
153
  homepage_uri: https://github.com/general-intelligence-systems/kube_schema
146
154
  source_code_uri: https://github.com/general-intelligence-systems/kube_schema
147
- documentation_uri: https://github.com/general-intelligence-systems/kube_schema
155
+ documentation_uri: https://general-intelligence-systems.github.io/kube_schema/
148
156
  rubygems_mfa_required: 'true'
149
157
  rdoc_options: []
150
158
  require_paths: