Class: Google::Apis::BinaryauthorizationV1::AdmissionRule
- Inherits:
-
Object
- Object
- Google::Apis::BinaryauthorizationV1::AdmissionRule
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/binaryauthorization_v1/classes.rb,
lib/google/apis/binaryauthorization_v1/representations.rb,
lib/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 allowlist 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>
Corresponds to the JSON property
requireAttestationsBy.
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.
48 49 50 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 48 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 'lib/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 'lib/google/apis/binaryauthorization_v1/classes.rb', line 41 def evaluation_mode @evaluation_mode end |
#require_attestations_by ⇒ Array<String>
Corresponds to the JSON property requireAttestationsBy
46 47 48 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 46 def require_attestations_by @require_attestations_by end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
53 54 55 56 57 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 53 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 |