mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Apply feedback
This commit is contained in:
		| @@ -48,8 +48,8 @@ import ( | |||||||
| //	semver('Three') // error | //	semver('Three') // error | ||||||
| //	semver('Mi') // error | //	semver('Mi') // error | ||||||
| //	semver('v1.0.0', true) // Applies normalization to remove the leading "v". Returns a Semver of "1.0.0". | //	semver('v1.0.0', true) // Applies normalization to remove the leading "v". Returns a Semver of "1.0.0". | ||||||
| //	semver('1.0') // Applies normalization to add the missing patch version. Returns a Semver of "1.0.0" | //	semver('1.0', true) // Applies normalization to add the missing patch version. Returns a Semver of "1.0.0" | ||||||
| //	semver('01.01.01') // Applies normalization to remove leading zeros. Returns a Semver of "1.1.1" | //	semver('01.01.01', true) // Applies normalization to remove leading zeros. Returns a Semver of "1.1.1" | ||||||
| // | // | ||||||
| // isSemver | // isSemver | ||||||
| // | // | ||||||
| @@ -66,9 +66,9 @@ import ( | |||||||
| //	isSemver('1.0.0') // returns true | //	isSemver('1.0.0') // returns true | ||||||
| //	isSemver('hello') // returns false | //	isSemver('hello') // returns false | ||||||
| //  isSemver('v1.0')  // returns false (leading "v" is not allowed unless normalization is enabled) | //  isSemver('v1.0')  // returns false (leading "v" is not allowed unless normalization is enabled) | ||||||
| //	isSemver('v1.0') // Applies normalization to remove leading "v". returns true | //	isSemver('v1.0', true) // Applies normalization to remove leading "v". returns true | ||||||
| //	semver('1.0') // Applies normalization to add the missing patch version. Returns true | //	semver('1.0', true) // Applies normalization to add the missing patch version. Returns true | ||||||
| //	semver('01.01.01') // Applies normalization to remove leading zeros. Returns true | //	semver('01.01.01', true) // Applies normalization to remove leading zeros. Returns true | ||||||
| // | // | ||||||
| // Conversion to Scalars: | // Conversion to Scalars: | ||||||
| // | // | ||||||
|   | |||||||
| @@ -298,8 +298,6 @@ func newCompiler() *compiler { | |||||||
| 			EnvOptions: []cel.EnvOption{ | 			EnvOptions: []cel.EnvOption{ | ||||||
| 				cel.Variable(deviceVar, deviceType.CelType()), | 				cel.Variable(deviceVar, deviceType.CelType()), | ||||||
|  |  | ||||||
| 				library.SemverLib(library.SemverVersion(0)), |  | ||||||
|  |  | ||||||
| 				// https://pkg.go.dev/github.com/google/cel-go/ext#Bindings | 				// https://pkg.go.dev/github.com/google/cel-go/ext#Bindings | ||||||
| 				// | 				// | ||||||
| 				// This is useful to simplify attribute lookups because the | 				// This is useful to simplify attribute lookups because the | ||||||
| @@ -312,6 +310,22 @@ func newCompiler() *compiler { | |||||||
| 				deviceType, | 				deviceType, | ||||||
| 			}, | 			}, | ||||||
| 		}, | 		}, | ||||||
|  | 		{ | ||||||
|  | 			IntroducedVersion: version.MajorMinor(1, 31), | ||||||
|  | 			// This library has added to base environment of Kubernetes | ||||||
|  | 			// in 1.33 at version 1. It will continue to be available for | ||||||
|  | 			// use in this environment, but does not need to be included | ||||||
|  | 			// directly since it becomes available indirectly via the base | ||||||
|  | 			// environment shared across Kubernetes. | ||||||
|  | 			// In Kubernetes 1.34, version 1 feature of this library will | ||||||
|  | 			// become available, and will be rollback safe to 1.33. | ||||||
|  | 			// TODO: In Kubernetes 1.34: Add compile tests that demonstrate that | ||||||
|  | 			// `isSemver("v1.0.0", true)` and `semver("v1.0.0", true)` are supported. | ||||||
|  | 			RemovedVersion: version.MajorMinor(1, 33), | ||||||
|  | 			EnvOptions: []cel.EnvOption{ | ||||||
|  | 				library.SemverLib(library.SemverVersion(0)), | ||||||
|  | 			}, | ||||||
|  | 		}, | ||||||
| 	} | 	} | ||||||
| 	envset, err := envset.Extend(versioned...) | 	envset, err := envset.Extend(versioned...) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Joe Betz
					Joe Betz