generators.external-secrets.io_acraccesstokens.yaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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: acraccesstokens.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: ACRAccessToken
  16. listKind: ACRAccessTokenList
  17. plural: acraccesstokens
  18. singular: acraccesstoken
  19. scope: Namespaced
  20. versions:
  21. - name: v1alpha1
  22. schema:
  23. openAPIV3Schema:
  24. description: |-
  25. ACRAccessToken returns an Azure Container Registry token
  26. that can be used for pushing/pulling images.
  27. Note: by default it will return an ACR Refresh Token with full access
  28. (depending on the identity).
  29. This can be scoped down to the repository level using .spec.scope.
  30. In case scope is defined it will return an ACR Access Token.
  31. See docs: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md
  32. properties:
  33. apiVersion:
  34. description: |-
  35. APIVersion defines the versioned schema of this representation of an object.
  36. Servers should convert recognized schemas to the latest internal value, and
  37. may reject unrecognized values.
  38. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  39. type: string
  40. kind:
  41. description: |-
  42. Kind is a string value representing the REST resource this object represents.
  43. Servers may infer this from the endpoint the client submits requests to.
  44. Cannot be updated.
  45. In CamelCase.
  46. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  47. type: string
  48. metadata:
  49. type: object
  50. spec:
  51. description: |-
  52. ACRAccessTokenSpec defines how to generate the access token
  53. e.g. how to authenticate and which registry to use.
  54. see: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview
  55. properties:
  56. auth:
  57. description: ACRAuth defines the authentication methods for Azure
  58. Container Registry.
  59. properties:
  60. managedIdentity:
  61. description: ManagedIdentity uses Azure Managed Identity to authenticate
  62. with Azure.
  63. properties:
  64. identityId:
  65. description: If multiple Managed Identity is assigned to the
  66. pod, you can select the one to be used
  67. type: string
  68. type: object
  69. servicePrincipal:
  70. description: ServicePrincipal uses Azure Service Principal credentials
  71. to authenticate with Azure.
  72. properties:
  73. secretRef:
  74. description: |-
  75. AzureACRServicePrincipalAuthSecretRef defines the secret references for Azure Service Principal authentication.
  76. It uses static credentials stored in a Kind=Secret.
  77. properties:
  78. clientId:
  79. description: The Azure clientId of the service principle
  80. used for authentication.
  81. properties:
  82. key:
  83. description: |-
  84. A key in the referenced Secret.
  85. Some instances of this field may be defaulted, in others it may be required.
  86. maxLength: 253
  87. minLength: 1
  88. pattern: ^[-._a-zA-Z0-9]+$
  89. type: string
  90. name:
  91. description: The name of the Secret resource being
  92. referred to.
  93. maxLength: 253
  94. minLength: 1
  95. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  96. type: string
  97. namespace:
  98. description: |-
  99. The namespace of the Secret resource being referred to.
  100. Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.
  101. maxLength: 63
  102. minLength: 1
  103. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
  104. type: string
  105. type: object
  106. clientSecret:
  107. description: The Azure ClientSecret of the service principle
  108. used for authentication.
  109. properties:
  110. key:
  111. description: |-
  112. A key in the referenced Secret.
  113. Some instances of this field may be defaulted, in others it may be required.
  114. maxLength: 253
  115. minLength: 1
  116. pattern: ^[-._a-zA-Z0-9]+$
  117. type: string
  118. name:
  119. description: The name of the Secret resource being
  120. referred to.
  121. maxLength: 253
  122. minLength: 1
  123. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  124. type: string
  125. namespace:
  126. description: |-
  127. The namespace of the Secret resource being referred to.
  128. Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.
  129. maxLength: 63
  130. minLength: 1
  131. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
  132. type: string
  133. type: object
  134. type: object
  135. required:
  136. - secretRef
  137. type: object
  138. workloadIdentity:
  139. description: WorkloadIdentity uses Azure Workload Identity to
  140. authenticate with Azure.
  141. properties:
  142. serviceAccountRef:
  143. description: |-
  144. ServiceAccountRef specified the service account
  145. that should be used when authenticating with WorkloadIdentity.
  146. properties:
  147. audiences:
  148. description: |-
  149. Audience specifies the `aud` claim for the service account token
  150. If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity
  151. then this audiences will be appended to the list
  152. items:
  153. type: string
  154. type: array
  155. name:
  156. description: The name of the ServiceAccount resource being
  157. referred to.
  158. maxLength: 253
  159. minLength: 1
  160. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
  161. type: string
  162. namespace:
  163. description: |-
  164. Namespace of the resource being referred to.
  165. Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent.
  166. maxLength: 63
  167. minLength: 1
  168. pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
  169. type: string
  170. required:
  171. - name
  172. type: object
  173. type: object
  174. type: object
  175. environmentType:
  176. default: PublicCloud
  177. description: |-
  178. EnvironmentType specifies the Azure cloud environment endpoints to use for
  179. connecting and authenticating with Azure. By default, it points to the public cloud AAD endpoint.
  180. The following endpoints are available, also see here: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152
  181. PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud
  182. enum:
  183. - PublicCloud
  184. - USGovernmentCloud
  185. - ChinaCloud
  186. - GermanCloud
  187. - AzureStackCloud
  188. type: string
  189. registry:
  190. description: |-
  191. the domain name of the ACR registry
  192. e.g. foobarexample.azurecr.io
  193. type: string
  194. scope:
  195. description: |-
  196. Define the scope for the access token, e.g. pull/push access for a repository.
  197. if not provided it will return a refresh token that has full scope.
  198. Note: you need to pin it down to the repository level, there is no wildcard available.
  199. examples:
  200. repository:my-repository:pull,push
  201. repository:my-repository:pull
  202. see docs for details: https://docs.docker.com/registry/spec/auth/scope/
  203. type: string
  204. tenantId:
  205. description: TenantID configures the Azure Tenant to send requests
  206. to. Required for ServicePrincipal auth type.
  207. type: string
  208. required:
  209. - auth
  210. - registry
  211. type: object
  212. type: object
  213. served: true
  214. storage: true
  215. subresources:
  216. status: {}