Use LocalObjectReference from fluxcd/pkg/meta v0.7
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
8e3700ebd8
commit
207ed99d72
|
@ -4,7 +4,7 @@ go 1.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/fluxcd/pkg/apis/meta v0.7.0
|
github.com/fluxcd/pkg/apis/meta v0.7.0
|
||||||
k8s.io/api v0.20.2
|
k8s.io/api v0.20.2 // indirect
|
||||||
k8s.io/apimachinery v0.20.2
|
k8s.io/apimachinery v0.20.2
|
||||||
sigs.k8s.io/controller-runtime v0.8.0
|
sigs.k8s.io/controller-runtime v0.8.0
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,7 +18,6 @@ package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/fluxcd/pkg/apis/meta"
|
"github.com/fluxcd/pkg/apis/meta"
|
||||||
corev1 "k8s.io/api/core/v1"
|
|
||||||
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
@ -55,7 +54,7 @@ type BucketSpec struct {
|
||||||
// The name of the secret containing authentication credentials
|
// The name of the secret containing authentication credentials
|
||||||
// for the Bucket.
|
// for the Bucket.
|
||||||
// +optional
|
// +optional
|
||||||
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
|
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
|
||||||
|
|
||||||
// The interval at which to check for bucket updates.
|
// The interval at which to check for bucket updates.
|
||||||
// +required
|
// +required
|
||||||
|
|
|
@ -18,7 +18,6 @@ package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/fluxcd/pkg/apis/meta"
|
"github.com/fluxcd/pkg/apis/meta"
|
||||||
corev1 "k8s.io/api/core/v1"
|
|
||||||
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
@ -45,7 +44,7 @@ type GitRepositorySpec struct {
|
||||||
// For SSH repositories the secret must contain identity, identity.pub and
|
// For SSH repositories the secret must contain identity, identity.pub and
|
||||||
// known_hosts fields.
|
// known_hosts fields.
|
||||||
// +optional
|
// +optional
|
||||||
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
|
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
|
||||||
|
|
||||||
// The interval at which to check for repository updates.
|
// The interval at which to check for repository updates.
|
||||||
// +required
|
// +required
|
||||||
|
@ -110,7 +109,7 @@ type GitRepositoryVerification struct {
|
||||||
Mode string `json:"mode"`
|
Mode string `json:"mode"`
|
||||||
|
|
||||||
// The secret name containing the public keys of all trusted Git authors.
|
// The secret name containing the public keys of all trusted Git authors.
|
||||||
SecretRef corev1.LocalObjectReference `json:"secretRef,omitempty"`
|
SecretRef meta.LocalObjectReference `json:"secretRef,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GitRepositoryStatus defines the observed state of a Git repository.
|
// GitRepositoryStatus defines the observed state of a Git repository.
|
||||||
|
|
|
@ -18,7 +18,6 @@ package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/fluxcd/pkg/apis/meta"
|
"github.com/fluxcd/pkg/apis/meta"
|
||||||
corev1 "k8s.io/api/core/v1"
|
|
||||||
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
apimeta "k8s.io/apimachinery/pkg/api/meta"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
@ -44,7 +43,7 @@ type HelmRepositorySpec struct {
|
||||||
// For TLS the secret must contain a certFile and keyFile, and/or
|
// For TLS the secret must contain a certFile and keyFile, and/or
|
||||||
// caCert fields.
|
// caCert fields.
|
||||||
// +optional
|
// +optional
|
||||||
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
|
SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
|
||||||
|
|
||||||
// The interval at which to check the upstream for updates.
|
// The interval at which to check the upstream for updates.
|
||||||
// +required
|
// +required
|
||||||
|
|
|
@ -21,8 +21,8 @@ limitations under the License.
|
||||||
package v1beta1
|
package v1beta1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/api/core/v1"
|
"github.com/fluxcd/pkg/apis/meta"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -106,13 +106,13 @@ func (in *BucketSpec) DeepCopyInto(out *BucketSpec) {
|
||||||
*out = *in
|
*out = *in
|
||||||
if in.SecretRef != nil {
|
if in.SecretRef != nil {
|
||||||
in, out := &in.SecretRef, &out.SecretRef
|
in, out := &in.SecretRef, &out.SecretRef
|
||||||
*out = new(v1.LocalObjectReference)
|
*out = new(meta.LocalObjectReference)
|
||||||
**out = **in
|
**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
|
||||||
*out = new(metav1.Duration)
|
*out = new(v1.Duration)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
if in.Ignore != nil {
|
if in.Ignore != nil {
|
||||||
|
@ -137,7 +137,7 @@ func (in *BucketStatus) DeepCopyInto(out *BucketStatus) {
|
||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]metav1.Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -239,13 +239,13 @@ func (in *GitRepositorySpec) DeepCopyInto(out *GitRepositorySpec) {
|
||||||
*out = *in
|
*out = *in
|
||||||
if in.SecretRef != nil {
|
if in.SecretRef != nil {
|
||||||
in, out := &in.SecretRef, &out.SecretRef
|
in, out := &in.SecretRef, &out.SecretRef
|
||||||
*out = new(v1.LocalObjectReference)
|
*out = new(meta.LocalObjectReference)
|
||||||
**out = **in
|
**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
|
||||||
*out = new(metav1.Duration)
|
*out = new(v1.Duration)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
if in.Reference != nil {
|
if in.Reference != nil {
|
||||||
|
@ -280,7 +280,7 @@ func (in *GitRepositoryStatus) DeepCopyInto(out *GitRepositoryStatus) {
|
||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]metav1.Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ func (in *HelmChartStatus) DeepCopyInto(out *HelmChartStatus) {
|
||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]metav1.Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
@ -487,13 +487,13 @@ func (in *HelmRepositorySpec) DeepCopyInto(out *HelmRepositorySpec) {
|
||||||
*out = *in
|
*out = *in
|
||||||
if in.SecretRef != nil {
|
if in.SecretRef != nil {
|
||||||
in, out := &in.SecretRef, &out.SecretRef
|
in, out := &in.SecretRef, &out.SecretRef
|
||||||
*out = new(v1.LocalObjectReference)
|
*out = new(meta.LocalObjectReference)
|
||||||
**out = **in
|
**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
|
||||||
*out = new(metav1.Duration)
|
*out = new(v1.Duration)
|
||||||
**out = **in
|
**out = **in
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -513,7 +513,7 @@ func (in *HelmRepositoryStatus) DeepCopyInto(out *HelmRepositoryStatus) {
|
||||||
*out = *in
|
*out = *in
|
||||||
if in.Conditions != nil {
|
if in.Conditions != nil {
|
||||||
in, out := &in.Conditions, &out.Conditions
|
in, out := &in.Conditions, &out.Conditions
|
||||||
*out = make([]metav1.Condition, len(*in))
|
*out = make([]v1.Condition, len(*in))
|
||||||
for i := range *in {
|
for i := range *in {
|
||||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,9 +83,10 @@ spec:
|
||||||
for the Bucket.
|
for the Bucket.
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
description: Name of the referent
|
||||||
TODO: Add other useful fields. apiVersion, kind, uid?'
|
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
type: object
|
type: object
|
||||||
suspend:
|
suspend:
|
||||||
description: This flag tells the controller to suspend the reconciliation
|
description: This flag tells the controller to suspend the reconciliation
|
||||||
|
|
|
@ -93,9 +93,10 @@ spec:
|
||||||
and known_hosts fields.
|
and known_hosts fields.
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
description: Name of the referent
|
||||||
TODO: Add other useful fields. apiVersion, kind, uid?'
|
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
type: object
|
type: object
|
||||||
suspend:
|
suspend:
|
||||||
description: This flag tells the controller to suspend the reconciliation
|
description: This flag tells the controller to suspend the reconciliation
|
||||||
|
@ -125,9 +126,10 @@ spec:
|
||||||
trusted Git authors.
|
trusted Git authors.
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
description: Name of the referent
|
||||||
TODO: Add other useful fields. apiVersion, kind, uid?'
|
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
type: object
|
type: object
|
||||||
required:
|
required:
|
||||||
- mode
|
- mode
|
||||||
|
|
|
@ -59,9 +59,10 @@ spec:
|
||||||
certFile and keyFile, and/or caCert fields.
|
certFile and keyFile, and/or caCert fields.
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
description: Name of the referent
|
||||||
TODO: Add other useful fields. apiVersion, kind, uid?'
|
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
type: object
|
type: object
|
||||||
suspend:
|
suspend:
|
||||||
description: This flag tells the controller to suspend the reconciliation
|
description: This flag tells the controller to suspend the reconciliation
|
||||||
|
|
|
@ -314,7 +314,7 @@ var _ = Describe("HelmChartReconciler", func() {
|
||||||
},
|
},
|
||||||
Spec: sourcev1.HelmRepositorySpec{
|
Spec: sourcev1.HelmRepositorySpec{
|
||||||
URL: helmServer.URL(),
|
URL: helmServer.URL(),
|
||||||
SecretRef: &corev1.LocalObjectReference{
|
SecretRef: &meta.LocalObjectReference{
|
||||||
Name: secretKey.Name,
|
Name: secretKey.Name,
|
||||||
},
|
},
|
||||||
Interval: metav1.Duration{Duration: pullInterval},
|
Interval: metav1.Duration{Duration: pullInterval},
|
||||||
|
@ -803,7 +803,7 @@ var _ = Describe("HelmChartReconciler", func() {
|
||||||
},
|
},
|
||||||
Spec: sourcev1.HelmRepositorySpec{
|
Spec: sourcev1.HelmRepositorySpec{
|
||||||
URL: helmServer.URL(),
|
URL: helmServer.URL(),
|
||||||
SecretRef: &corev1.LocalObjectReference{
|
SecretRef: &meta.LocalObjectReference{
|
||||||
Name: secretKey.Name,
|
Name: secretKey.Name,
|
||||||
},
|
},
|
||||||
Interval: metav1.Duration{Duration: pullInterval},
|
Interval: metav1.Duration{Duration: pullInterval},
|
||||||
|
|
|
@ -30,6 +30,7 @@ import (
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/types"
|
"k8s.io/apimachinery/pkg/types"
|
||||||
|
|
||||||
|
"github.com/fluxcd/pkg/apis/meta"
|
||||||
"github.com/fluxcd/pkg/helmtestserver"
|
"github.com/fluxcd/pkg/helmtestserver"
|
||||||
|
|
||||||
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
|
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
|
||||||
|
@ -250,7 +251,7 @@ var _ = Describe("HelmRepositoryReconciler", func() {
|
||||||
},
|
},
|
||||||
Spec: sourcev1.HelmRepositorySpec{
|
Spec: sourcev1.HelmRepositorySpec{
|
||||||
URL: helmServer.URL(),
|
URL: helmServer.URL(),
|
||||||
SecretRef: &corev1.LocalObjectReference{
|
SecretRef: &meta.LocalObjectReference{
|
||||||
Name: secretKey.Name,
|
Name: secretKey.Name,
|
||||||
},
|
},
|
||||||
Interval: metav1.Duration{Duration: indexInterval},
|
Interval: metav1.Duration{Duration: indexInterval},
|
||||||
|
@ -343,7 +344,7 @@ var _ = Describe("HelmRepositoryReconciler", func() {
|
||||||
},
|
},
|
||||||
Spec: sourcev1.HelmRepositorySpec{
|
Spec: sourcev1.HelmRepositorySpec{
|
||||||
URL: helmServer.URL(),
|
URL: helmServer.URL(),
|
||||||
SecretRef: &corev1.LocalObjectReference{
|
SecretRef: &meta.LocalObjectReference{
|
||||||
Name: secretKey.Name,
|
Name: secretKey.Name,
|
||||||
},
|
},
|
||||||
Interval: metav1.Duration{Duration: indexInterval},
|
Interval: metav1.Duration{Duration: indexInterval},
|
||||||
|
|
|
@ -136,8 +136,8 @@ string
|
||||||
<td>
|
<td>
|
||||||
<code>secretRef</code><br>
|
<code>secretRef</code><br>
|
||||||
<em>
|
<em>
|
||||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#localobjectreference-v1-core">
|
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
Kubernetes core/v1.LocalObjectReference
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
</a>
|
</a>
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
|
@ -291,8 +291,8 @@ string
|
||||||
<td>
|
<td>
|
||||||
<code>secretRef</code><br>
|
<code>secretRef</code><br>
|
||||||
<em>
|
<em>
|
||||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#localobjectreference-v1-core">
|
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
Kubernetes core/v1.LocalObjectReference
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
</a>
|
</a>
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
|
@ -642,8 +642,8 @@ string
|
||||||
<td>
|
<td>
|
||||||
<code>secretRef</code><br>
|
<code>secretRef</code><br>
|
||||||
<em>
|
<em>
|
||||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#localobjectreference-v1-core">
|
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
Kubernetes core/v1.LocalObjectReference
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
</a>
|
</a>
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
|
@ -880,8 +880,8 @@ string
|
||||||
<td>
|
<td>
|
||||||
<code>secretRef</code><br>
|
<code>secretRef</code><br>
|
||||||
<em>
|
<em>
|
||||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#localobjectreference-v1-core">
|
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
Kubernetes core/v1.LocalObjectReference
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
</a>
|
</a>
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
|
@ -1137,8 +1137,8 @@ string
|
||||||
<td>
|
<td>
|
||||||
<code>secretRef</code><br>
|
<code>secretRef</code><br>
|
||||||
<em>
|
<em>
|
||||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#localobjectreference-v1-core">
|
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
Kubernetes core/v1.LocalObjectReference
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
</a>
|
</a>
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
|
@ -1371,8 +1371,8 @@ string
|
||||||
<td>
|
<td>
|
||||||
<code>secretRef</code><br>
|
<code>secretRef</code><br>
|
||||||
<em>
|
<em>
|
||||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#localobjectreference-v1-core">
|
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
Kubernetes core/v1.LocalObjectReference
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
</a>
|
</a>
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
|
@ -1600,8 +1600,8 @@ string
|
||||||
<td>
|
<td>
|
||||||
<code>secretRef</code><br>
|
<code>secretRef</code><br>
|
||||||
<em>
|
<em>
|
||||||
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#localobjectreference-v1-core">
|
<a href="https://godoc.org/github.com/fluxcd/pkg/apis/meta#LocalObjectReference">
|
||||||
Kubernetes core/v1.LocalObjectReference
|
github.com/fluxcd/pkg/apis/meta.LocalObjectReference
|
||||||
</a>
|
</a>
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue