mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-22 03:25:44 +00:00
Add subcommands for image-repository
This adds all the standard subcommands for the ImageRepository type. Following `source`, I have put them under a namespace: `auto`, referring to automation. NB For `create` I use controllerutil.CreateOrUpdate, which looks to me like a slightly more rounded version of the upsert* funcs. Signed-off-by: Michael Bridgen <michael@weave.works>
This commit is contained in:
parent
16f52610ab
commit
b66bdec61a
38 changed files with 1756 additions and 10 deletions
|
|
@ -30,6 +30,7 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/olekukonko/tablewriter"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
apiruntime "k8s.io/apimachinery/pkg/runtime"
|
||||
|
|
@ -42,11 +43,12 @@ import (
|
|||
"sigs.k8s.io/yaml"
|
||||
|
||||
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
|
||||
imageautov1 "github.com/fluxcd/image-automation-controller/api/v1alpha1"
|
||||
imagereflectv1 "github.com/fluxcd/image-reflector-controller/api/v1alpha1"
|
||||
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta1"
|
||||
notificationv1 "github.com/fluxcd/notification-controller/api/v1beta1"
|
||||
"github.com/fluxcd/pkg/runtime/dependency"
|
||||
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
|
||||
"github.com/olekukonko/tablewriter"
|
||||
)
|
||||
|
||||
type Utils struct {
|
||||
|
|
@ -156,6 +158,8 @@ func KubeClient(kubeConfigPath string, kubeContext string) (client.Client, error
|
|||
_ = kustomizev1.AddToScheme(scheme)
|
||||
_ = helmv2.AddToScheme(scheme)
|
||||
_ = notificationv1.AddToScheme(scheme)
|
||||
_ = imagereflectv1.AddToScheme(scheme)
|
||||
_ = imageautov1.AddToScheme(scheme)
|
||||
|
||||
kubeClient, err := client.New(cfg, client.Options{
|
||||
Scheme: scheme,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue