Chapter 3. CredentialsRequest [cloudcredential.openshift.io/v1]


Description
CredentialsRequest is the Schema for the credentialsrequests API
Type
object
Required
  • spec

3.1. Specification

PropertyTypeDescription

apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

ObjectMeta

Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object

CredentialsRequestSpec defines the desired state of CredentialsRequest

status

object

CredentialsRequestStatus defines the observed state of CredentialsRequest

3.1.1. .spec

Description
CredentialsRequestSpec defines the desired state of CredentialsRequest
Type
object
Required
  • secretRef
PropertyTypeDescription

cloudTokenPath

string

cloudTokenPath is the path where the Kubernetes ServiceAccount token (JSON Web Token) is mounted on the deployment for the workload requesting a credentials secret. The presence of this field in combination with fields such as spec.providerSpec.stsIAMRoleARN indicate that CCO should broker creation of a credentials secret containing fields necessary for token based authentication methods such as with the AWS Secure Token Service (STS). cloudTokenPath may also be used to specify the azure_federated_token_file path used in Azure configuration secrets generated by ccoctl. Defaults to "/var/run/secrets/openshift/serviceaccount/token".

providerSpec

``

ProviderSpec contains the cloud provider specific credentials specification.

secretRef

object

SecretRef points to the secret where the credentials should be stored once generated.

serviceAccountNames

array (string)

ServiceAccountNames contains a list of ServiceAccounts that will use permissions associated with this CredentialsRequest. This is not used by CCO, but the information is needed for being able to properly set up access control in the cloud provider when the ServiceAccounts are used as part of the cloud credentials flow.

3.1.2. .spec.secretRef

Description
SecretRef points to the secret where the credentials should be stored once generated.
Type
object
PropertyTypeDescription

apiVersion

string

API version of the referent.

fieldPath

string

If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.

kind

string

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

name

string

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

namespace

string

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

resourceVersion

string

Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency

uid

string

UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids

3.1.3. .status

Description
CredentialsRequestStatus defines the observed state of CredentialsRequest
Type
object
Required
  • lastSyncGeneration
  • provisioned
PropertyTypeDescription

conditions

array

Conditions includes detailed status for the CredentialsRequest

conditions[]

object

CredentialsRequestCondition contains details for any of the conditions on a CredentialsRequest object

lastSyncCloudCredsSecretResourceVersion

string

LastSyncCloudCredsSecretResourceVersion is the resource version of the cloud credentials secret resource when the credentials request resource was last synced. Used to determine if the the cloud credentials have been updated since the last sync.

lastSyncGeneration

integer

LastSyncGeneration is the generation of the credentials request resource that was last synced. Used to determine if the object has changed and requires a sync.

lastSyncTimestamp

string

LastSyncTimestamp is the time that the credentials were last synced.

providerStatus

``

ProviderStatus contains cloud provider specific status.

provisioned

boolean

Provisioned is true once the credentials have been initially provisioned.

3.1.4. .status.conditions

Description
Conditions includes detailed status for the CredentialsRequest
Type
array

3.1.5. .status.conditions[]

Description
CredentialsRequestCondition contains details for any of the conditions on a CredentialsRequest object
Type
object
Required
  • status
  • type
PropertyTypeDescription

lastProbeTime

string

LastProbeTime is the last time we probed the condition

lastTransitionTime

string

LastTransitionTime is the last time the condition transitioned from one status to another.

message

string

Message is a human-readable message indicating details about the last transition

reason

string

Reason is a unique, one-word, CamelCase reason for the condition’s last transition

status

string

Status is the status of the condition

type

string

Type is the specific type of the condition

3.2. API endpoints

The following API endpoints are available:

  • /apis/cloudcredential.openshift.io/v1/credentialsrequests

    • GET: list objects of kind CredentialsRequest
  • /apis/cloudcredential.openshift.io/v1/namespaces/{namespace}/credentialsrequests

    • DELETE: delete collection of CredentialsRequest
    • GET: list objects of kind CredentialsRequest
    • POST: create a CredentialsRequest
  • /apis/cloudcredential.openshift.io/v1/namespaces/{namespace}/credentialsrequests/{name}

    • DELETE: delete a CredentialsRequest
    • GET: read the specified CredentialsRequest
    • PATCH: partially update the specified CredentialsRequest
    • PUT: replace the specified CredentialsRequest
  • /apis/cloudcredential.openshift.io/v1/namespaces/{namespace}/credentialsrequests/{name}/status

    • GET: read status of the specified CredentialsRequest
    • PATCH: partially update status of the specified CredentialsRequest
    • PUT: replace status of the specified CredentialsRequest

3.2.1. /apis/cloudcredential.openshift.io/v1/credentialsrequests

HTTP method
GET
Description
list objects of kind CredentialsRequest
Table 3.1. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequestList schema

401 - Unauthorized

Empty

3.2.2. /apis/cloudcredential.openshift.io/v1/namespaces/{namespace}/credentialsrequests

HTTP method
DELETE
Description
delete collection of CredentialsRequest
Table 3.2. HTTP responses
HTTP codeReponse body

200 - OK

Status schema

401 - Unauthorized

Empty

HTTP method
GET
Description
list objects of kind CredentialsRequest
Table 3.3. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequestList schema

401 - Unauthorized

Empty

HTTP method
POST
Description
create a CredentialsRequest
Table 3.4. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.5. Body parameters
ParameterTypeDescription

body

CredentialsRequest schema

 
Table 3.6. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequest schema

201 - Created

CredentialsRequest schema

202 - Accepted

CredentialsRequest schema

401 - Unauthorized

Empty

3.2.3. /apis/cloudcredential.openshift.io/v1/namespaces/{namespace}/credentialsrequests/{name}

Table 3.7. Global path parameters
ParameterTypeDescription

name

string

name of the CredentialsRequest

HTTP method
DELETE
Description
delete a CredentialsRequest
Table 3.8. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

Table 3.9. HTTP responses
HTTP codeReponse body

200 - OK

Status schema

202 - Accepted

Status schema

401 - Unauthorized

Empty

HTTP method
GET
Description
read the specified CredentialsRequest
Table 3.10. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequest schema

401 - Unauthorized

Empty

HTTP method
PATCH
Description
partially update the specified CredentialsRequest
Table 3.11. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.12. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequest schema

401 - Unauthorized

Empty

HTTP method
PUT
Description
replace the specified CredentialsRequest
Table 3.13. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.14. Body parameters
ParameterTypeDescription

body

CredentialsRequest schema

 
Table 3.15. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequest schema

201 - Created

CredentialsRequest schema

401 - Unauthorized

Empty

3.2.4. /apis/cloudcredential.openshift.io/v1/namespaces/{namespace}/credentialsrequests/{name}/status

Table 3.16. Global path parameters
ParameterTypeDescription

name

string

name of the CredentialsRequest

HTTP method
GET
Description
read status of the specified CredentialsRequest
Table 3.17. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequest schema

401 - Unauthorized

Empty

HTTP method
PATCH
Description
partially update status of the specified CredentialsRequest
Table 3.18. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.19. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequest schema

401 - Unauthorized

Empty

HTTP method
PUT
Description
replace status of the specified CredentialsRequest
Table 3.20. Query parameters
ParameterTypeDescription

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 3.21. Body parameters
ParameterTypeDescription

body

CredentialsRequest schema

 
Table 3.22. HTTP responses
HTTP codeReponse body

200 - OK

CredentialsRequest schema

201 - Created

CredentialsRequest schema

401 - Unauthorized

Empty

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.