Class: Google::Apis::BinaryauthorizationV1beta1::AdmissionRule
- Inherits:
-
Object
- Object
- Google::Apis::BinaryauthorizationV1beta1::AdmissionRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/binaryauthorization_v1beta1/classes.rb,
generated/google/apis/binaryauthorization_v1beta1/representations.rb,
generated/google/apis/binaryauthorization_v1beta1/representations.rb
Overview
An admission rule specifies either that all container images used in a pod creation request must be attested to by one or more attestors, that all pod creations will be allowed, or that all pod creations will be denied. Images matching an admission whitelist pattern are exempted from admission rules and will never block a pod creation.
Instance Attribute Summary collapse
-
#enforcement_mode ⇒ String
Required.
-
#evaluation_mode ⇒ String
Required.
-
#require_attestations_by ⇒ Array<String>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AdmissionRule
constructor
A new instance of AdmissionRule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ AdmissionRule
Returns a new instance of AdmissionRule
55 56 57 |
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 55 def initialize(**args) update!(**args) end |
Instance Attribute Details
#enforcement_mode ⇒ String
Required. The action when a pod creation is denied by the admission rule.
Corresponds to the JSON property enforcementMode
37 38 39 |
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 37 def enforcement_mode @enforcement_mode end |
#evaluation_mode ⇒ String
Required. How this admission rule will be evaluated.
Corresponds to the JSON property evaluationMode
42 43 44 |
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 42 def evaluation_mode @evaluation_mode end |
#require_attestations_by ⇒ Array<String>
Optional. The resource names of the attestors that must attest to
a container image, in the format projects/*/attestors/*
. Each
attestor must exist before a policy can reference it. To add an attestor
to a policy the principal issuing the policy change request must be able
to read the attestor resource.
Note: this field must be non-empty when the evaluation_mode field specifies
REQUIRE_ATTESTATION, otherwise it must be empty.
Corresponds to the JSON property requireAttestationsBy
53 54 55 |
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 53 def require_attestations_by @require_attestations_by end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
60 61 62 63 64 |
# File 'generated/google/apis/binaryauthorization_v1beta1/classes.rb', line 60 def update!(**args) @enforcement_mode = args[:enforcement_mode] if args.key?(:enforcement_mode) @evaluation_mode = args[:evaluation_mode] if args.key?(:evaluation_mode) @require_attestations_by = args[:require_attestations_by] if args.key?(:require_attestations_by) end |