Update fluxcd/pkg/runtime to v0.8.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
parent
587d2410fe
commit
f5a8b922b9
2
Makefile
2
Makefile
|
@ -5,7 +5,7 @@ CRD_OPTIONS ?= crd:crdVersions=v1
|
|||
|
||||
# Version of the source-controller from which to get the GitRepository CRD.
|
||||
# Change this if you bump the source-controller/api version in go.mod.
|
||||
SOURCE_VER ?= v0.6.2
|
||||
SOURCE_VER ?= v0.7.0
|
||||
|
||||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
||||
ifeq (,$(shell go env GOBIN))
|
||||
|
|
|
@ -3,7 +3,7 @@ module github.com/fluxcd/image-automation-controller/api
|
|||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/fluxcd/pkg/apis/meta v0.6.0
|
||||
github.com/fluxcd/pkg/apis/meta v0.7.0
|
||||
k8s.io/api v0.20.2
|
||||
k8s.io/apimachinery v0.20.2
|
||||
sigs.k8s.io/controller-runtime v0.8.0
|
||||
|
|
|
@ -88,8 +88,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
|
|||
github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fluxcd/pkg/apis/meta v0.6.0 h1:3ETc/Yz4qXGKLj+Iti6vKFwVE024WX+Jr+jIHlxj7zs=
|
||||
github.com/fluxcd/pkg/apis/meta v0.6.0/go.mod h1:yHuY8kyGHYz22I0jQzqMMGCcHViuzC/WPdo9Gisk8Po=
|
||||
github.com/fluxcd/pkg/apis/meta v0.7.0 h1:5e8gm4OLqjuKWdrOIY5DEEsjcwzyJFK8rCDesJ+V8IY=
|
||||
github.com/fluxcd/pkg/apis/meta v0.7.0/go.mod h1:yHuY8kyGHYz22I0jQzqMMGCcHViuzC/WPdo9Gisk8Po=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
|
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/fluxcd/pkg/apis/meta"
|
||||
|
@ -54,7 +53,7 @@ type GitCheckoutSpec struct {
|
|||
// GitRepositoryRef refers to the resource giving access details
|
||||
// to a git repository to update files in.
|
||||
// +required
|
||||
GitRepositoryRef corev1.LocalObjectReference `json:"gitRepositoryRef"`
|
||||
GitRepositoryRef meta.LocalObjectReference `json:"gitRepositoryRef"`
|
||||
// Branch gives the branch to clone from the git repository.
|
||||
// +required
|
||||
Branch string `json:"branch"`
|
||||
|
|
|
@ -53,9 +53,10 @@ spec:
|
|||
details to a git repository to update files in.
|
||||
properties:
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||||
TODO: Add other useful fields. apiVersion, kind, uid?'
|
||||
description: Name of the referent
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
required:
|
||||
- branch
|
||||
|
|
|
@ -159,7 +159,7 @@ var _ = Describe("ImageUpdateAutomation", func() {
|
|||
Namespace: policyKey.Namespace,
|
||||
},
|
||||
Spec: imagev1_reflect.ImagePolicySpec{
|
||||
ImageRepositoryRef: corev1.LocalObjectReference{
|
||||
ImageRepositoryRef: meta.LocalObjectReference{
|
||||
Name: "not-expected-to-exist",
|
||||
},
|
||||
Policy: imagev1_reflect.ImagePolicyChoice{
|
||||
|
@ -199,7 +199,7 @@ var _ = Describe("ImageUpdateAutomation", func() {
|
|||
Spec: imagev1.ImageUpdateAutomationSpec{
|
||||
Interval: metav1.Duration{Duration: 2 * time.Hour}, // this is to ensure any subsequent run should be outside the scope of the testing
|
||||
Checkout: imagev1.GitCheckoutSpec{
|
||||
GitRepositoryRef: corev1.LocalObjectReference{
|
||||
GitRepositoryRef: meta.LocalObjectReference{
|
||||
Name: "garbage",
|
||||
},
|
||||
Branch: branch,
|
||||
|
@ -257,7 +257,7 @@ var _ = Describe("ImageUpdateAutomation", func() {
|
|||
Spec: imagev1.ImageUpdateAutomationSpec{
|
||||
Interval: metav1.Duration{Duration: 2 * time.Hour}, // this is to ensure any subsequent run should be outside the scope of the testing
|
||||
Checkout: imagev1.GitCheckoutSpec{
|
||||
GitRepositoryRef: corev1.LocalObjectReference{
|
||||
GitRepositoryRef: meta.LocalObjectReference{
|
||||
Name: gitRepoKey.Name,
|
||||
},
|
||||
Branch: branch,
|
||||
|
|
12
go.mod
12
go.mod
|
@ -9,13 +9,13 @@ replace gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
|
|||
|
||||
require (
|
||||
github.com/fluxcd/image-automation-controller/api v0.3.1
|
||||
github.com/fluxcd/image-reflector-controller/api v0.3.0
|
||||
github.com/fluxcd/pkg/apis/meta v0.6.0
|
||||
github.com/fluxcd/image-reflector-controller/api v0.4.0
|
||||
github.com/fluxcd/pkg/apis/meta v0.7.0
|
||||
github.com/fluxcd/pkg/gittestserver v0.1.0
|
||||
github.com/fluxcd/pkg/runtime v0.7.0
|
||||
github.com/fluxcd/source-controller v0.6.2
|
||||
// If you bump this, change TOOLKIT_VERSION in the Makefile to match
|
||||
github.com/fluxcd/source-controller/api v0.6.2
|
||||
github.com/fluxcd/pkg/runtime v0.8.0
|
||||
github.com/fluxcd/source-controller v0.7.0
|
||||
// If you bump this, change SOURCE_VER in the Makefile to match
|
||||
github.com/fluxcd/source-controller/api v0.7.0
|
||||
github.com/go-git/go-billy/v5 v5.0.0
|
||||
github.com/go-git/go-git/v5 v5.2.0
|
||||
github.com/go-logr/logr v0.3.0
|
||||
|
|
20
go.sum
20
go.sum
|
@ -302,26 +302,26 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM
|
|||
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/fluxcd/image-reflector-controller/api v0.3.0 h1:ZG/gb+XUQWX6FSvuzpvxz4kgdRp1mfRJIQyaHx4XMrQ=
|
||||
github.com/fluxcd/image-reflector-controller/api v0.3.0/go.mod h1:tE+oSbiM0bXDhmt1Jrg5o9pdFmXCBxlpPn1GQSCzXv0=
|
||||
github.com/fluxcd/pkg/apis/meta v0.6.0 h1:3ETc/Yz4qXGKLj+Iti6vKFwVE024WX+Jr+jIHlxj7zs=
|
||||
github.com/fluxcd/pkg/apis/meta v0.6.0/go.mod h1:yHuY8kyGHYz22I0jQzqMMGCcHViuzC/WPdo9Gisk8Po=
|
||||
github.com/fluxcd/image-reflector-controller/api v0.4.0 h1:/7mxmTsjmwmzTchWG06FaTki4hbN4qrVXdT5l/Yio5A=
|
||||
github.com/fluxcd/image-reflector-controller/api v0.4.0/go.mod h1:MS3mGjZLnzZsfSqVLGbp0WNJr/k8XRFpw4G6ApLFTbc=
|
||||
github.com/fluxcd/pkg/apis/meta v0.7.0 h1:5e8gm4OLqjuKWdrOIY5DEEsjcwzyJFK8rCDesJ+V8IY=
|
||||
github.com/fluxcd/pkg/apis/meta v0.7.0/go.mod h1:yHuY8kyGHYz22I0jQzqMMGCcHViuzC/WPdo9Gisk8Po=
|
||||
github.com/fluxcd/pkg/gittestserver v0.1.0 h1:BvIG+bBhgbmqhtpSS2qUpOXRIL1P1Ow2jauloH8X86U=
|
||||
github.com/fluxcd/pkg/gittestserver v0.1.0/go.mod h1:HWZaoib03fQeSsauCAN2iAFdr6bnjKQ+CFxMFD2mwDY=
|
||||
github.com/fluxcd/pkg/helmtestserver v0.1.0/go.mod h1:3L+tbPn74PsHwHsyhbfk/kZAosrwMFTTA92XEFiwVAE=
|
||||
github.com/fluxcd/pkg/lockedfile v0.0.5/go.mod h1:uAtPUBId6a2RqO84MTH5HKGX0SbM1kNW3Wr/FhYyDVA=
|
||||
github.com/fluxcd/pkg/runtime v0.7.0 h1:AMzqHGae0zqDQAmKwa1htjStk2wphwWF0xQw/zD3FY4=
|
||||
github.com/fluxcd/pkg/runtime v0.7.0/go.mod h1:1dzGFwtowST5AIW5i9f0Pn0fMhCmOHFyBizuPJSKX+s=
|
||||
github.com/fluxcd/pkg/runtime v0.8.0 h1:cnSBZJLcXlKgjXpFFFExu+4ZncIxmPgNIx+ErLcCLnA=
|
||||
github.com/fluxcd/pkg/runtime v0.8.0/go.mod h1:tQwEN+RESjJmtwSSv7I+6bkNM9raIXpGsCjruaIVX6A=
|
||||
github.com/fluxcd/pkg/ssh v0.0.5 h1:rnbFZ7voy2JBlUfMbfyqArX2FYaLNpDhccGFC3qW83A=
|
||||
github.com/fluxcd/pkg/ssh v0.0.5/go.mod h1:7jXPdXZpc0ttMNz2kD9QuMi3RNn/e0DOFbj0Tij/+Hs=
|
||||
github.com/fluxcd/pkg/testserver v0.0.2/go.mod h1:pgUZTh9aQ44FSTQo+5NFlh7YMbUfdz1B80DalW7k96Y=
|
||||
github.com/fluxcd/pkg/untar v0.0.5/go.mod h1:O6V9+rtl8c1mHBafgqFlJN6zkF1HS5SSYn7RpQJ/nfw=
|
||||
github.com/fluxcd/pkg/version v0.0.1 h1:/8asQoDXSThz3csiwi4Qo8Zb6blAxLXbtxNgeMJ9bCg=
|
||||
github.com/fluxcd/pkg/version v0.0.1/go.mod h1:WAF4FEEA9xyhngF8TDxg3UPu5fA1qhEYV8Pmi2Il01Q=
|
||||
github.com/fluxcd/source-controller v0.6.2 h1:OEhz9reG6t7+uYHlxkjGjO+xfOTezOPOGBjCH8Uc0gM=
|
||||
github.com/fluxcd/source-controller v0.6.2/go.mod h1:o/t/4jB64wFvY3WE5n0nGsoS9DaOGZzeNAzwDfy+NYs=
|
||||
github.com/fluxcd/source-controller/api v0.6.2 h1:xgKZg0Ajeh/jPPePZJriDUgzxgCXIFBPqZso9obtpko=
|
||||
github.com/fluxcd/source-controller/api v0.6.2/go.mod h1:LzLXD6RfQ+4Es+gUuIZE4NCSW2WkWIK91EnVBCMvbQw=
|
||||
github.com/fluxcd/source-controller v0.7.0 h1:OvvD0a9ZhlIshZt0NzkXJ5hAD8Zce7xERFC1UyhfXZA=
|
||||
github.com/fluxcd/source-controller v0.7.0/go.mod h1:hfpk9y5iDJlSZqL+/OZTqvYDFZgIKz1PV26bOy404+M=
|
||||
github.com/fluxcd/source-controller/api v0.7.0 h1:QDpr6ZjHtTxw+mc+mZ1p9qRujHb+PzPdoQP3YgWlqOA=
|
||||
github.com/fluxcd/source-controller/api v0.7.0/go.mod h1:u2sdc/QDm0tzXHL7mZVj928hc3MMU+4mKCuAQg+94Bk=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
|
||||
|
|
13
main.go
13
main.go
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
package main
|
||||
|
||||
import (
|
||||
goflag "flag"
|
||||
"github.com/fluxcd/pkg/runtime/client"
|
||||
"os"
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
|
@ -61,6 +61,7 @@ func main() {
|
|||
eventsAddr string
|
||||
healthAddr string
|
||||
enableLeaderElection bool
|
||||
clientOptions client.Options
|
||||
logOptions logger.Options
|
||||
watchAllNamespaces bool
|
||||
)
|
||||
|
@ -75,11 +76,8 @@ func main() {
|
|||
"Watch for custom resources in all namespaces, if set to false it will only watch the runtime namespace.")
|
||||
flag.Bool("log-json", false, "Set logging to JSON format.")
|
||||
flag.CommandLine.MarkDeprecated("log-json", "Please use --log-encoding=json instead.")
|
||||
{
|
||||
var fs goflag.FlagSet
|
||||
logOptions.BindFlags(&fs)
|
||||
flag.CommandLine.AddGoFlagSet(&fs)
|
||||
}
|
||||
clientOptions.BindFlags(flag.CommandLine)
|
||||
logOptions.BindFlags(flag.CommandLine)
|
||||
flag.Parse()
|
||||
|
||||
log := logger.NewLogger(logOptions)
|
||||
|
@ -103,7 +101,8 @@ func main() {
|
|||
watchNamespace = os.Getenv("RUNTIME_NAMESPACE")
|
||||
}
|
||||
|
||||
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
|
||||
restConfig := client.GetConfigOrDie(clientOptions)
|
||||
mgr, err := ctrl.NewManager(restConfig, ctrl.Options{
|
||||
Scheme: scheme,
|
||||
MetricsBindAddress: metricsAddr,
|
||||
HealthProbeBindAddress: healthAddr,
|
||||
|
|
Loading…
Reference in New Issue