|
1 | 1 | { |
2 | 2 | local d = (import 'doc-util/main.libsonnet'), |
3 | | - '#':: d.pkg(name='acrAccessToken', url='', help='"ACRAccessToken returns a Azure Container Registry token\\nthat can be used for pushing/pulling images.\\nNote: by default it will return an ACR Refresh Token with full access\\n(depending on the identity).\\nThis can be scoped down to the repository level using .spec.scope.\\nIn case scope is defined it will return an ACR Access Token.\\n\\n\\nSee docs: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md"'), |
| 3 | + '#':: d.pkg(name='acrAccessToken', url='', help='"ACRAccessToken returns an Azure Container Registry token\\nthat can be used for pushing/pulling images.\\nNote: by default it will return an ACR Refresh Token with full access\\n(depending on the identity).\\nThis can be scoped down to the repository level using .spec.scope.\\nIn case scope is defined it will return an ACR Access Token.\\n\\nSee docs: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md"'), |
4 | 4 | '#metadata':: d.obj(help='"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create."'), |
5 | 5 | metadata: { |
6 | 6 | '#withAnnotations':: d.fn(help='"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"', args=[d.arg(name='annotations', type=d.T.object)]), |
|
62 | 62 | secretRef: { |
63 | 63 | '#clientId':: d.obj(help='"The Azure clientId of the service principle used for authentication."'), |
64 | 64 | clientId: { |
65 | | - '#withKey':: d.fn(help="\"The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be\\ndefaulted, in others it may be required.\"", args=[d.arg(name='key', type=d.T.string)]), |
| 65 | + '#withKey':: d.fn(help='"A key in the referenced Secret.\\nSome instances of this field may be defaulted, in others it may be required."', args=[d.arg(name='key', type=d.T.string)]), |
66 | 66 | withKey(key): { spec+: { auth+: { servicePrincipal+: { secretRef+: { clientId+: { key: key } } } } } }, |
67 | 67 | '#withName':: d.fn(help='"The name of the Secret resource being referred to."', args=[d.arg(name='name', type=d.T.string)]), |
68 | 68 | withName(name): { spec+: { auth+: { servicePrincipal+: { secretRef+: { clientId+: { name: name } } } } } }, |
69 | | - '#withNamespace':: d.fn(help='"Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults\\nto the namespace of the referent."', args=[d.arg(name='namespace', type=d.T.string)]), |
| 69 | + '#withNamespace':: d.fn(help='"The namespace of the Secret resource being referred to.\\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent."', args=[d.arg(name='namespace', type=d.T.string)]), |
70 | 70 | withNamespace(namespace): { spec+: { auth+: { servicePrincipal+: { secretRef+: { clientId+: { namespace: namespace } } } } } }, |
71 | 71 | }, |
72 | 72 | '#clientSecret':: d.obj(help='"The Azure ClientSecret of the service principle used for authentication."'), |
73 | 73 | clientSecret: { |
74 | | - '#withKey':: d.fn(help="\"The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be\\ndefaulted, in others it may be required.\"", args=[d.arg(name='key', type=d.T.string)]), |
| 74 | + '#withKey':: d.fn(help='"A key in the referenced Secret.\\nSome instances of this field may be defaulted, in others it may be required."', args=[d.arg(name='key', type=d.T.string)]), |
75 | 75 | withKey(key): { spec+: { auth+: { servicePrincipal+: { secretRef+: { clientSecret+: { key: key } } } } } }, |
76 | 76 | '#withName':: d.fn(help='"The name of the Secret resource being referred to."', args=[d.arg(name='name', type=d.T.string)]), |
77 | 77 | withName(name): { spec+: { auth+: { servicePrincipal+: { secretRef+: { clientSecret+: { name: name } } } } } }, |
78 | | - '#withNamespace':: d.fn(help='"Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults\\nto the namespace of the referent."', args=[d.arg(name='namespace', type=d.T.string)]), |
| 78 | + '#withNamespace':: d.fn(help='"The namespace of the Secret resource being referred to.\\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent."', args=[d.arg(name='namespace', type=d.T.string)]), |
79 | 79 | withNamespace(namespace): { spec+: { auth+: { servicePrincipal+: { secretRef+: { clientSecret+: { namespace: namespace } } } } } }, |
80 | 80 | }, |
81 | 81 | }, |
|
90 | 90 | withAudiencesMixin(audiences): { spec+: { auth+: { workloadIdentity+: { serviceAccountRef+: { audiences+: if std.isArray(v=audiences) then audiences else [audiences] } } } } }, |
91 | 91 | '#withName':: d.fn(help='"The name of the ServiceAccount resource being referred to."', args=[d.arg(name='name', type=d.T.string)]), |
92 | 92 | withName(name): { spec+: { auth+: { workloadIdentity+: { serviceAccountRef+: { name: name } } } } }, |
93 | | - '#withNamespace':: d.fn(help='"Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults\\nto the namespace of the referent."', args=[d.arg(name='namespace', type=d.T.string)]), |
| 93 | + '#withNamespace':: d.fn(help='"Namespace of the resource being referred to.\\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent."', args=[d.arg(name='namespace', type=d.T.string)]), |
94 | 94 | withNamespace(namespace): { spec+: { auth+: { workloadIdentity+: { serviceAccountRef+: { namespace: namespace } } } } }, |
95 | 95 | }, |
96 | 96 | }, |
|
99 | 99 | withEnvironmentType(environmentType): { spec+: { environmentType: environmentType } }, |
100 | 100 | '#withRegistry':: d.fn(help='"the domain name of the ACR registry\\ne.g. foobarexample.azurecr.io"', args=[d.arg(name='registry', type=d.T.string)]), |
101 | 101 | withRegistry(registry): { spec+: { registry: registry } }, |
102 | | - '#withScope':: d.fn(help='"Define the scope for the access token, e.g. pull/push access for a repository.\\nif not provided it will return a refresh token that has full scope.\\nNote: you need to pin it down to the repository level, there is no wildcard available.\\n\\n\\nexamples:\\nrepository:my-repository:pull,push\\nrepository:my-repository:pull\\n\\n\\nsee docs for details: https://docs.docker.com/registry/spec/auth/scope/"', args=[d.arg(name='scope', type=d.T.string)]), |
| 102 | + '#withScope':: d.fn(help='"Define the scope for the access token, e.g. pull/push access for a repository.\\nif not provided it will return a refresh token that has full scope.\\nNote: you need to pin it down to the repository level, there is no wildcard available.\\n\\nexamples:\\nrepository:my-repository:pull,push\\nrepository:my-repository:pull\\n\\nsee docs for details: https://docs.docker.com/registry/spec/auth/scope/"', args=[d.arg(name='scope', type=d.T.string)]), |
103 | 103 | withScope(scope): { spec+: { scope: scope } }, |
104 | 104 | '#withTenantId':: d.fn(help='"TenantID configures the Azure Tenant to send requests to. Required for ServicePrincipal auth type."', args=[d.arg(name='tenantId', type=d.T.string)]), |
105 | 105 | withTenantId(tenantId): { spec+: { tenantId: tenantId } }, |
|
0 commit comments