helmrepo: add `.spec.certSecretRef` for specifying TLS auth data
Add `.spec.certSecretRef` to HelmRepository for specifying TLS auth data in a secret using the `certFile`, `caFile` and `keyFile` keys. Mark support for these keys in the secret specified in `.spec.secretRef` as deprecated. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
This commit is contained in:
parent
a4b0a8840b
commit
9986d9918e
|
@ -51,11 +51,18 @@ type HelmRepositorySpec struct {
|
||||||
// for the HelmRepository.
|
// for the HelmRepository.
|
||||||
// For HTTP/S basic auth the secret must contain 'username' and 'password'
|
// For HTTP/S basic auth the secret must contain 'username' and 'password'
|
||||||
// fields.
|
// fields.
|
||||||
// For TLS the secret must contain a 'certFile' and 'keyFile', and/or
|
// Support for TLS auth using the 'certFile' and 'keyFile', and/or 'caFile'
|
||||||
// 'caFile' fields.
|
// keys is deprecated. Please use `.spec.certSecretRef` instead.
|
||||||
// +optional
|
// +optional
|
||||||
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
|
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
|
||||||
|
|
||||||
|
// CertSecretRef specifies the Secret containing the TLS authentication
|
||||||
|
// data. The secret must contain a 'certFile' and 'keyFile', and/or 'caFile'
|
||||||
|
// fields. It takes precedence over the values specified in the Secret
|
||||||
|
// referred to by `.spec.secretRef`.
|
||||||
|
// +optional
|
||||||
|
CertSecretRef *meta.LocalObjectReference `json:"certSecretRef,omitempty"`
|
||||||
|
|
||||||
// PassCredentials allows the credentials from the SecretRef to be passed
|
// PassCredentials allows the credentials from the SecretRef to be passed
|
||||||
// on to a host that does not match the host as defined in URL.
|
// on to a host that does not match the host as defined in URL.
|
||||||
// This may be required if the host of the advertised chart URLs in the
|
// This may be required if the host of the advertised chart URLs in the
|
||||||
|
|
|
@ -577,6 +577,11 @@ func (in *HelmRepositorySpec) DeepCopyInto(out *HelmRepositorySpec) {
|
||||||
*out = new(meta.LocalObjectReference)
|
*out = new(meta.LocalObjectReference)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
|
if in.CertSecretRef != nil {
|
||||||
|
in, out := &in.CertSecretRef, &out.CertSecretRef
|
||||||
|
*out = new(meta.LocalObjectReference)
|
||||||
|
**out = **in
|
||||||
|
}
|
||||||
out.Interval = in.Interval
|
out.Interval = in.Interval
|
||||||
if in.Timeout != nil {
|
if in.Timeout != nil {
|
||||||
in, out := &in.Timeout, &out.Timeout
|
in, out := &in.Timeout, &out.Timeout
|
||||||
|
|
|
@ -296,6 +296,18 @@ spec:
|
||||||
required:
|
required:
|
||||||
- namespaceSelectors
|
- namespaceSelectors
|
||||||
type: object
|
type: object
|
||||||
|
certSecretRef:
|
||||||
|
description: CertSecretRef specifies the Secret containing the TLS
|
||||||
|
authentication data. The secret must contain a 'certFile' and 'keyFile',
|
||||||
|
and/or 'caFile' fields. It takes precedence over the values specified
|
||||||
|
in the Secret referred to by `.spec.secretRef`.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
description: Name of the referent.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
type: object
|
||||||
interval:
|
interval:
|
||||||
description: Interval at which to check the URL for updates.
|
description: Interval at which to check the URL for updates.
|
||||||
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
|
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
|
||||||
|
@ -323,8 +335,9 @@ spec:
|
||||||
secretRef:
|
secretRef:
|
||||||
description: SecretRef specifies the Secret containing authentication
|
description: SecretRef specifies the Secret containing authentication
|
||||||
credentials for the HelmRepository. For HTTP/S basic auth the secret
|
credentials for the HelmRepository. For HTTP/S basic auth the secret
|
||||||
must contain 'username' and 'password' fields. For TLS the secret
|
must contain 'username' and 'password' fields. Support for TLS auth
|
||||||
must contain a 'certFile' and 'keyFile', and/or 'caFile' fields.
|
using the 'certFile' and 'keyFile', and/or 'caFile' keys is deprecated.
|
||||||
|
Please use `.spec.certSecretRef` instead.
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
description: Name of the referent.
|
description: Name of the referent.
|
||||||
|
|
|
@ -792,8 +792,25 @@ github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
for the HelmRepository.
|
for the HelmRepository.
|
||||||
For HTTP/S basic auth the secret must contain ‘username’ and ‘password’
|
For HTTP/S basic auth the secret must contain ‘username’ and ‘password’
|
||||||
fields.
|
fields.
|
||||||
For TLS the secret must contain a ‘certFile’ and ‘keyFile’, and/or
|
Support for TLS auth using the ‘certFile’ and ‘keyFile’, and/or ‘caFile’
|
||||||
‘caFile’ fields.</p>
|
keys is deprecated. Please use <code>.spec.certSecretRef</code> instead.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>certSecretRef</code><br>
|
||||||
|
<em>
|
||||||
|
<a href="https://pkg.go.dev/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
|
</a>
|
||||||
|
</em>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<em>(Optional)</em>
|
||||||
|
<p>CertSecretRef specifies the Secret containing the TLS authentication
|
||||||
|
data. The secret must contain a ‘certFile’ and ‘keyFile’, and/or ‘caFile’
|
||||||
|
fields. It takes precedence over the values specified in the Secret
|
||||||
|
referred to by <code>.spec.secretRef</code>.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -2459,8 +2476,25 @@ github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
for the HelmRepository.
|
for the HelmRepository.
|
||||||
For HTTP/S basic auth the secret must contain ‘username’ and ‘password’
|
For HTTP/S basic auth the secret must contain ‘username’ and ‘password’
|
||||||
fields.
|
fields.
|
||||||
For TLS the secret must contain a ‘certFile’ and ‘keyFile’, and/or
|
Support for TLS auth using the ‘certFile’ and ‘keyFile’, and/or ‘caFile’
|
||||||
‘caFile’ fields.</p>
|
keys is deprecated. Please use <code>.spec.certSecretRef</code> instead.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<code>certSecretRef</code><br>
|
||||||
|
<em>
|
||||||
|
<a href="https://pkg.go.dev/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
|
</a>
|
||||||
|
</em>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<em>(Optional)</em>
|
||||||
|
<p>CertSecretRef specifies the Secret containing the TLS authentication
|
||||||
|
data. The secret must contain a ‘certFile’ and ‘keyFile’, and/or ‘caFile’
|
||||||
|
fields. It takes precedence over the values specified in the Secret
|
||||||
|
referred to by <code>.spec.secretRef</code>.</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue