Class: Google::Apis::ContainerV1beta1::InitScript

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/container_v1beta1/classes.rb,
lib/google/apis/container_v1beta1/representations.rb,
lib/google/apis/container_v1beta1/representations.rb

Overview

InitScript provide a simply bash script to be executed on the node.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InitScript

Returns a new instance of InitScript.



5253
5254
5255
# File 'lib/google/apis/container_v1beta1/classes.rb', line 5253

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#argsArray<String>

Optional. The optional arguments line to be passed to the init script. Corresponds to the JSON property args

Returns:

  • (Array<String>)


5224
5225
5226
# File 'lib/google/apis/container_v1beta1/classes.rb', line 5224

def args
  @args
end

#gcp_secret_manager_secret_uriString

The resource name of the secret manager secret hosting the init script. Both global and regional secrets are supported with format below: Global secret: projects/project/secrets/secret/versions/version Regional secret: projects/project/locations/location/secrets/secret/versions/version Example: projects/1234567890/secrets/script_1/versions/1. Accept version number only, not support version alias. User can't configure both gcp_secret_manager_secret_uri and gcs_uri. Corresponds to the JSON property gcpSecretManagerSecretUri

Returns:

  • (String)


5235
5236
5237
# File 'lib/google/apis/container_v1beta1/classes.rb', line 5235

def gcp_secret_manager_secret_uri
  @gcp_secret_manager_secret_uri
end

#gcs_generationFixnum

The generation of the init script stored in Gloud Storage. This is the required field to identify the version of the init script. User can get the genetaion from gcloud storage objects describe gs://BUCKET_NAME/OBJECT_NAME -- format="value(generation)" or from the "Version history" tab of the object in the Cloud Console UI. Corresponds to the JSON property gcsGeneration

Returns:

  • (Fixnum)


5244
5245
5246
# File 'lib/google/apis/container_v1beta1/classes.rb', line 5244

def gcs_generation
  @gcs_generation
end

#gcs_uriString

The Cloud Storage URI for storing the init script. Format: gs://BUCKET_NAME/ OBJECT_NAME The service account on the node pool must have read access to the object. User can't configure both gcs_uri and gcp_secret_manager_secret_uri. Corresponds to the JSON property gcsUri

Returns:

  • (String)


5251
5252
5253
# File 'lib/google/apis/container_v1beta1/classes.rb', line 5251

def gcs_uri
  @gcs_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5258
5259
5260
5261
5262
5263
# File 'lib/google/apis/container_v1beta1/classes.rb', line 5258

def update!(**args)
  @args = args[:args] if args.key?(:args)
  @gcp_secret_manager_secret_uri = args[:gcp_secret_manager_secret_uri] if args.key?(:gcp_secret_manager_secret_uri)
  @gcs_generation = args[:gcs_generation] if args.key?(:gcs_generation)
  @gcs_uri = args[:gcs_uri] if args.key?(:gcs_uri)
end