Class: Google::Apis::BinaryauthorizationV1::AdmissionRule
- Inherits:
-
Object
- Object
- Google::Apis::BinaryauthorizationV1::AdmissionRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/binaryauthorization_v1/classes.rb,
generated/google/apis/binaryauthorization_v1/representations.rb,
generated/google/apis/binaryauthorization_v1/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.
Constructor Details
#initialize(**args) ⇒ AdmissionRule
Returns a new instance of AdmissionRule.
53 54 55 |
# File 'generated/google/apis/binaryauthorization_v1/classes.rb', line 53 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
36 37 38 |
# File 'generated/google/apis/binaryauthorization_v1/classes.rb', line 36 def enforcement_mode @enforcement_mode end |
#evaluation_mode ⇒ String
Required. How this admission rule will be evaluated.
Corresponds to the JSON property evaluationMode
41 42 43 |
# File 'generated/google/apis/binaryauthorization_v1/classes.rb', line 41 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
51 52 53 |
# File 'generated/google/apis/binaryauthorization_v1/classes.rb', line 51 def require_attestations_by @require_attestations_by end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
58 59 60 61 62 |
# File 'generated/google/apis/binaryauthorization_v1/classes.rb', line 58 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 |