Class: Google::Apis::BinaryauthorizationV1::Policy
- Inherits:
-
Object
- Object
- Google::Apis::BinaryauthorizationV1::Policy
- 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
A policy for container image binary authorization.
Instance Attribute Summary collapse
-
#admission_whitelist_patterns ⇒ Array<Google::Apis::BinaryauthorizationV1::AdmissionWhitelistPattern>
Optional.
-
#cluster_admission_rules ⇒ Hash<String,Google::Apis::BinaryauthorizationV1::AdmissionRule>
Optional.
-
#default_admission_rule ⇒ Google::Apis::BinaryauthorizationV1::AdmissionRule
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.
-
#description ⇒ String
Optional.
-
#etag ⇒ String
Optional.
-
#global_policy_evaluation_mode ⇒ String
Optional.
-
#istio_service_identity_admission_rules ⇒ Hash<String,Google::Apis::BinaryauthorizationV1::AdmissionRule>
Optional.
-
#kubernetes_namespace_admission_rules ⇒ Hash<String,Google::Apis::BinaryauthorizationV1::AdmissionRule>
Optional.
-
#kubernetes_service_account_admission_rules ⇒ Hash<String,Google::Apis::BinaryauthorizationV1::AdmissionRule>
Optional.
-
#name ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Policy
constructor
A new instance of Policy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Policy
Returns a new instance of Policy.
970 971 972 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 970 def initialize(**args) update!(**args) end |
Instance Attribute Details
#admission_whitelist_patterns ⇒ Array<Google::Apis::BinaryauthorizationV1::AdmissionWhitelistPattern>
Optional. Admission policy allowlisting. A matching admission request will
always be permitted. This feature is typically used to exclude Google or third-
party infrastructure images from Binary Authorization policies.
Corresponds to the JSON property admissionWhitelistPatterns
900 901 902 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 900 def admission_whitelist_patterns @admission_whitelist_patterns end |
#cluster_admission_rules ⇒ Hash<String,Google::Apis::BinaryauthorizationV1::AdmissionRule>
Optional. Per-cluster admission rules. Cluster spec format: location.
clusterId. There can be at most one admission rule per cluster spec. A
location is either a compute zone (e.g. us-central1-a) or a region (e.g. us-
central1). For clusterId syntax restrictions see https://cloud.google.com/
container-engine/reference/rest/v1/projects.zones.clusters.
Corresponds to the JSON property clusterAdmissionRules
909 910 911 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 909 def cluster_admission_rules @cluster_admission_rules end |
#default_admission_rule ⇒ Google::Apis::BinaryauthorizationV1::AdmissionRule
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.
Corresponds to the JSON property defaultAdmissionRule
918 919 920 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 918 def default_admission_rule @default_admission_rule end |
#description ⇒ String
Optional. A descriptive comment.
Corresponds to the JSON property description
923 924 925 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 923 def description @description end |
#etag ⇒ String
Optional. A checksum, returned by the server, that can be sent on update
requests to ensure the policy has an up-to-date value before attempting to
update it. See https://google.aip.dev/154.
Corresponds to the JSON property etag
930 931 932 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 930 def etag @etag end |
#global_policy_evaluation_mode ⇒ String
Optional. Controls the evaluation of a Google-maintained global admission
policy for common system-level images. Images not covered by the global policy
will be subject to the project admission policy. This setting has no effect
when specified inside a global admission policy.
Corresponds to the JSON property globalPolicyEvaluationMode
938 939 940 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 938 def global_policy_evaluation_mode @global_policy_evaluation_mode end |
#istio_service_identity_admission_rules ⇒ Hash<String,Google::Apis::BinaryauthorizationV1::AdmissionRule>
Optional. Per-istio-service-identity admission rules. Istio service identity
spec format: spiffe:///ns//sa/ or /ns//sa/ e.g. spiffe://example.com/ns/
test-ns/sa/default
Corresponds to the JSON property istioServiceIdentityAdmissionRules
945 946 947 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 945 def istio_service_identity_admission_rules @istio_service_identity_admission_rules end |
#kubernetes_namespace_admission_rules ⇒ Hash<String,Google::Apis::BinaryauthorizationV1::AdmissionRule>
Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
[a-z.-]+, e.g. some-namespace
Corresponds to the JSON property kubernetesNamespaceAdmissionRules
951 952 953 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 951 def kubernetes_namespace_admission_rules @kubernetes_namespace_admission_rules end |
#kubernetes_service_account_admission_rules ⇒ Hash<String,Google::Apis::BinaryauthorizationV1::AdmissionRule>
Optional. Per-kubernetes-service-account admission rules. Service account spec
format: namespace:serviceaccount. e.g. test-ns:default
Corresponds to the JSON property kubernetesServiceAccountAdmissionRules
957 958 959 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 957 def kubernetes_service_account_admission_rules @kubernetes_service_account_admission_rules end |
#name ⇒ String
Output only. The resource name, in the format projects/*/policy. There is at
most one policy per project.
Corresponds to the JSON property name
963 964 965 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 963 def name @name end |
#update_time ⇒ String
Output only. Time when the policy was last updated.
Corresponds to the JSON property updateTime
968 969 970 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 968 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
975 976 977 978 979 980 981 982 983 984 985 986 987 |
# File 'lib/google/apis/binaryauthorization_v1/classes.rb', line 975 def update!(**args) @admission_whitelist_patterns = args[:admission_whitelist_patterns] if args.key?(:admission_whitelist_patterns) @cluster_admission_rules = args[:cluster_admission_rules] if args.key?(:cluster_admission_rules) @default_admission_rule = args[:default_admission_rule] if args.key?(:default_admission_rule) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @global_policy_evaluation_mode = args[:global_policy_evaluation_mode] if args.key?(:global_policy_evaluation_mode) @istio_service_identity_admission_rules = args[:istio_service_identity_admission_rules] if args.key?(:istio_service_identity_admission_rules) @kubernetes_namespace_admission_rules = args[:kubernetes_namespace_admission_rules] if args.key?(:kubernetes_namespace_admission_rules) @kubernetes_service_account_admission_rules = args[:kubernetes_service_account_admission_rules] if args.key?(:kubernetes_service_account_admission_rules) @name = args[:name] if args.key?(:name) @update_time = args[:update_time] if args.key?(:update_time) end |