"description":"Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule.",
"description":"Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.",
"description":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf '*' or '*/*' is present, the length of the slice must be one. Required.",
"description":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.",
"type":"array",
"type":"array",
"items":{
"items":{
"type":"string"
"type":"string"
...
@@ -50328,7 +50328,7 @@
...
@@ -50328,7 +50328,7 @@
}
}
},
},
"resources":{
"resources":{
"description":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf '*' or '*/*' is present, the length of the slice must be one. Required.",
"description":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.",
"description":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf '*' or '*/*' is present, the length of the slice must be one. Required."
"description":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required."
}
}
}
}
},
},
...
@@ -1813,7 +1813,7 @@
...
@@ -1813,7 +1813,7 @@
"items":{
"items":{
"$ref":"v1alpha1.Rule"
"$ref":"v1alpha1.Rule"
},
},
"description":"Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule."
"description":"Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources."
},
},
"failurePolicy":{
"failurePolicy":{
"$ref":"v1alpha1.FailurePolicyType",
"$ref":"v1alpha1.FailurePolicyType",
...
@@ -1844,7 +1844,7 @@
...
@@ -1844,7 +1844,7 @@
"items":{
"items":{
"type":"string"
"type":"string"
},
},
"description":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf '*' or '*/*' is present, the length of the slice must be one. Required."
"description":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required."
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Resources is a list of resources this rule applies to.<br>
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Resources is a list of resources this rule applies to.<br>
<br>
<br>
For example: <em>pods</em> means pods. <em>pods/log</em> means the log subresource of pods. <em><strong></em> means all resources, but not subresources. <em>pods/</strong></em> means all subresources of pods. <em><strong>/scale</em> means all scale subresources. <em></strong>/<strong></em> means all resources and their subresources.<br>
For example: <em>pods</em> means pods. <em>pods/log</em> means the log subresource of pods. <em><strong></em> means all resources, but not subresources. <em>pods/</strong></em> means all subresources of pods. <em><strong>/scale</em> means all scale subresources. <em></strong>/*</em> means all resources and their subresources.<br>
<br>
<br>
If <em></strong></em> or <em><strong>/</strong></em> is present, the length of the slice must be one. Required.</p></td>
If wildcard is present, the validation rule will ensure resources do not overlap with each other.<br>
<br>
Depending on the enclosing object, subresources might not be allowed. Required.</p></td>
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Resources is a list of resources this rule applies to.<br>
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Resources is a list of resources this rule applies to.<br>
<br>
<br>
For example: <em>pods</em> means pods. <em>pods/log</em> means the log subresource of pods. <em><strong></em> means all resources, but not subresources. <em>pods/</strong></em> means all subresources of pods. <em><strong>/scale</em> means all scale subresources. <em></strong>/<strong></em> means all resources and their subresources.<br>
For example: <em>pods</em> means pods. <em>pods/log</em> means the log subresource of pods. <em><strong></em> means all resources, but not subresources. <em>pods/</strong></em> means all subresources of pods. <em><strong>/scale</em> means all scale subresources. <em></strong>/*</em> means all resources and their subresources.<br>
<br>
If wildcard is present, the validation rule will ensure resources do not overlap with each other.<br>
<br>
<br>
If <em></strong></em> or <em><strong>/</strong></em> is present, the length of the slice must be one. Required.</p></td>
Depending on the enclosing object, subresources might not be allowed. Required.</p></td>
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches <em>any</em> Rule.</p></td>
<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches <em>any</em> Rule. Rule.Resources must not include subresources.</p></td>
"":"Initializer describes the name and the failure policy of an initializer, and what resources it applies to.",
"":"Initializer describes the name and the failure policy of an initializer, and what resources it applies to.",
"name":"Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required",
"name":"Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required",
"rules":"Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule.",
"rules":"Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.",
"failurePolicy":"FailurePolicy defines what happens if the responsible initializer controller fails to takes action. Allowed values are Ignore, or Fail. If \"Ignore\" is set, initializer is removed from the initializers list of an object if the timeout is reached; If \"Fail\" is set, admissionregistration returns timeout error if the timeout is reached.",
"failurePolicy":"FailurePolicy defines what happens if the responsible initializer controller fails to takes action. Allowed values are Ignore, or Fail. If \"Ignore\" is set, initializer is removed from the initializers list of an object if the timeout is reached; If \"Fail\" is set, admissionregistration returns timeout error if the timeout is reached.",
}
}
...
@@ -104,7 +104,7 @@ var map_Rule = map[string]string{
...
@@ -104,7 +104,7 @@ var map_Rule = map[string]string{
"":"Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.",
"":"Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.",
"apiGroups":"APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.",
"apiGroups":"APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.",
"apiVersions":"APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.",
"apiVersions":"APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.",
"resources":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf '*' or '*/*' is present, the length of the slice must be one. Required.",
"resources":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.",
expectedError:`initializers[0].rules[0].apiGroups: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other API groups, initializers[0].rules[0].apiVersions: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other API versions, initializers[0].rules[0].Resources: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other resources`,
expectedError:`[initializers[0].rules[0].apiGroups: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other API groups, initializers[0].rules[0].apiVersions: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other API versions, initializers[0].rules[0].resources: Invalid value: []string{"a", "*"}: if '*' is present, must not specify other resources]`,
},
{
name:"Subresource not allowed",
config:getInitializerConfiguration(
[]admissionregistration.Initializer{
{
Name:"initializer.k8s.io",
Rules:[]admissionregistration.Rule{
{
APIGroups:[]string{"a"},
APIVersions:[]string{"a"},
Resources:[]string{"a/b"},
},
},
},
}),
expectedError:` "a/b": must not specify subresources`,
expectedError:`externalAdmissionHook[1].name: Invalid value: "k8s.io": should be a domain with at least two dots, externalAdmissionHook[2].name: Required value`,
expectedError:`externalAdmissionHooks[1].name: Invalid value: "k8s.io": should be a domain with at least two dots, externalAdmissionHooks[2].name: Required value`,
expectedError:`externalAdmissionHooks[0].rules[0].resources: Invalid value: []string{"*/*", "a"}: if '*/*' is present, must not specify other resources`,
"":"Initializer describes the name and the failure policy of an initializer, and what resources it applies to.",
"":"Initializer describes the name and the failure policy of an initializer, and what resources it applies to.",
"name":"Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required",
"name":"Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required",
"rules":"Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule.",
"rules":"Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.",
"failurePolicy":"FailurePolicy defines what happens if the responsible initializer controller fails to takes action. Allowed values are Ignore, or Fail. If \"Ignore\" is set, initializer is removed from the initializers list of an object if the timeout is reached; If \"Fail\" is set, admissionregistration returns timeout error if the timeout is reached.",
"failurePolicy":"FailurePolicy defines what happens if the responsible initializer controller fails to takes action. Allowed values are Ignore, or Fail. If \"Ignore\" is set, initializer is removed from the initializers list of an object if the timeout is reached; If \"Fail\" is set, admissionregistration returns timeout error if the timeout is reached.",
}
}
...
@@ -104,7 +104,7 @@ var map_Rule = map[string]string{
...
@@ -104,7 +104,7 @@ var map_Rule = map[string]string{
"":"Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.",
"":"Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.",
"apiGroups":"APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.",
"apiGroups":"APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.",
"apiVersions":"APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.",
"apiVersions":"APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.",
"resources":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf '*' or '*/*' is present, the length of the slice must be one. Required.",
"resources":"Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.",