generators.external-secrets.io_gcraccesstokens.yaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. apiVersion: apiextensions.k8s.io/v1
  2. kind: CustomResourceDefinition
  3. metadata:
  4. annotations:
  5. controller-gen.kubebuilder.io/version: v0.19.0
  6. labels:
  7. external-secrets.io/component: controller
  8. name: gcraccesstokens.generators.external-secrets.io
  9. spec:
  10. group: generators.external-secrets.io
  11. names:
  12. categories:
  13. - external-secrets
  14. - external-secrets-generators
  15. kind: GCRAccessToken
  16. listKind: GCRAccessTokenList
  17. plural: gcraccesstokens
  18. singular: gcraccesstoken
  19. scope: Namespaced
  20. versions:
  21. - name: v1alpha1
  22. schema:
  23. openAPIV3Schema:
  24. description: |-
  25. GCRAccessToken generates an GCP access token
  26. that can be used to authenticate with GCR.
  27. properties:
  28. apiVersion:
  29. description: |-
  30. APIVersion defines the versioned schema of this representation of an object.
  31. Servers should convert recognized schemas to the latest internal value, and
  32. may reject unrecognized values.
  33. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  34. type: string
  35. kind:
  36. description: |-
  37. Kind is a string value representing the REST resource this object represents.
  38. Servers may infer this from the endpoint the client submits requests to.
  39. Cannot be updated.
  40. In CamelCase.
  41. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  42. type: string
  43. metadata:
  44. type: object
  45. spec:
  46. description: GCRAccessTokenSpec defines the desired state to generate
  47. a Google Container Registry access token.
  48. properties:
  49. auth:
  50. description: Auth defines the means for authenticating with GCP
  51. properties:
  52. secretRef:
  53. description: GCPSMAuthSecretRef defines the reference to a secret
  54. containing Google Cloud Platform credentials.
  55. properties:
  56. secretAccessKeySecretRef:
  57. description: The SecretAccessKey is used for authentication
  58. properties:
  59. key:
  60. description: |-
  61. A key in the referenced Secret.
  62. Some instances of this field may be defaulted, in others it may be required.
  63. maxLength: 253
  64. minLength: 1
  65. pattern: ^[-._a-zA-Z0-9]+$
  66. type: string
  67. name:
  68. description: The name of the Secret resource being referred
  69. to.
  70. maxLength: 253
  71. minLength: 1
  72. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  73. type: string
  74. namespace:
  75. description: |-
  76. The namespace of the Secret resource being referred to.
  77. Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.
  78. maxLength: 63
  79. minLength: 1
  80. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
  81. type: string
  82. type: object
  83. type: object
  84. workloadIdentity:
  85. description: GCPWorkloadIdentity defines the configuration for
  86. using GCP Workload Identity authentication.
  87. properties:
  88. clusterLocation:
  89. type: string
  90. clusterName:
  91. type: string
  92. clusterProjectID:
  93. type: string
  94. serviceAccountRef:
  95. description: ServiceAccountSelector is a reference to a ServiceAccount
  96. resource.
  97. properties:
  98. audiences:
  99. description: |-
  100. Audience specifies the `aud` claim for the service account token
  101. If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity
  102. then this audiences will be appended to the list
  103. items:
  104. type: string
  105. type: array
  106. name:
  107. description: The name of the ServiceAccount resource being
  108. referred to.
  109. maxLength: 253
  110. minLength: 1
  111. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  112. type: string
  113. namespace:
  114. description: |-
  115. Namespace of the resource being referred to.
  116. Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.
  117. maxLength: 63
  118. minLength: 1
  119. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
  120. type: string
  121. required:
  122. - name
  123. type: object
  124. required:
  125. - clusterLocation
  126. - clusterName
  127. - serviceAccountRef
  128. type: object
  129. workloadIdentityFederation:
  130. description: GCPWorkloadIdentityFederation holds the configurations
  131. required for generating federated access tokens.
  132. properties:
  133. audience:
  134. description: |-
  135. audience is the Secure Token Service (STS) audience which contains the resource name for the workload identity pool and the provider identifier in that pool.
  136. If specified, Audience found in the external account credential config will be overridden with the configured value.
  137. audience must be provided when serviceAccountRef or awsSecurityCredentials is configured.
  138. type: string
  139. awsSecurityCredentials:
  140. description: |-
  141. awsSecurityCredentials is for configuring AWS region and credentials to use for obtaining the access token,
  142. when using the AWS metadata server is not an option.
  143. properties:
  144. awsCredentialsSecretRef:
  145. description: |-
  146. awsCredentialsSecretRef is the reference to the secret which holds the AWS credentials.
  147. Secret should be created with below names for keys
  148. - aws_access_key_id: Access Key ID, which is the unique identifier for the AWS account or the IAM user.
  149. - aws_secret_access_key: Secret Access Key, which is used to authenticate requests made to AWS services.
  150. - aws_session_token: Session Token, is the short-lived token to authenticate requests made to AWS services.
  151. properties:
  152. name:
  153. description: name of the secret.
  154. maxLength: 253
  155. minLength: 1
  156. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  157. type: string
  158. namespace:
  159. description: namespace in which the secret exists.
  160. If empty, secret will looked up in local namespace.
  161. maxLength: 63
  162. minLength: 1
  163. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
  164. type: string
  165. required:
  166. - name
  167. type: object
  168. region:
  169. description: region is for configuring the AWS region
  170. to be used.
  171. example: ap-south-1
  172. maxLength: 50
  173. minLength: 1
  174. pattern: ^[a-z0-9-]+$
  175. type: string
  176. required:
  177. - awsCredentialsSecretRef
  178. - region
  179. type: object
  180. credConfig:
  181. description: |-
  182. credConfig holds the configmap reference containing the GCP external account credential configuration in JSON format and the key name containing the json data.
  183. For using Kubernetes cluster as the identity provider, use serviceAccountRef instead. Operators mounted serviceaccount token cannot be used as the token source, instead
  184. serviceAccountRef must be used by providing operators service account details.
  185. properties:
  186. key:
  187. description: key name holding the external account credential
  188. config.
  189. maxLength: 253
  190. minLength: 1
  191. pattern: ^[-._a-zA-Z0-9]+$
  192. type: string
  193. name:
  194. description: name of the configmap.
  195. maxLength: 253
  196. minLength: 1
  197. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  198. type: string
  199. namespace:
  200. description: namespace in which the configmap exists.
  201. If empty, configmap will looked up in local namespace.
  202. maxLength: 63
  203. minLength: 1
  204. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
  205. type: string
  206. required:
  207. - key
  208. - name
  209. type: object
  210. externalTokenEndpoint:
  211. description: |-
  212. externalTokenEndpoint is the endpoint explicitly set up to provide tokens, which will be matched against the
  213. credential_source.url in the provided credConfig. This field is merely to double-check the external token source
  214. URL is having the expected value.
  215. type: string
  216. serviceAccountRef:
  217. description: |-
  218. serviceAccountRef is the reference to the kubernetes ServiceAccount to be used for obtaining the tokens,
  219. when Kubernetes is configured as provider in workload identity pool.
  220. properties:
  221. audiences:
  222. description: |-
  223. Audience specifies the `aud` claim for the service account token
  224. If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity
  225. then this audiences will be appended to the list
  226. items:
  227. type: string
  228. type: array
  229. name:
  230. description: The name of the ServiceAccount resource being
  231. referred to.
  232. maxLength: 253
  233. minLength: 1
  234. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  235. type: string
  236. namespace:
  237. description: |-
  238. Namespace of the resource being referred to.
  239. Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.
  240. maxLength: 63
  241. minLength: 1
  242. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
  243. type: string
  244. required:
  245. - name
  246. type: object
  247. type: object
  248. type: object
  249. projectID:
  250. description: ProjectID defines which project to use to authenticate
  251. with
  252. type: string
  253. required:
  254. - auth
  255. - projectID
  256. type: object
  257. type: object
  258. served: true
  259. storage: true
  260. subresources:
  261. status: {}