mirror of https://github.com/fluxcd/flux2.git
Compare commits
163 Commits
Author | SHA1 | Date |
---|---|---|
|
a8e0ea495d | 5 days ago |
|
8fb1ccebfa | 5 days ago |
|
664423230d | 1 week ago |
|
0c8cfcdc85 | 1 week ago |
|
89d4467a50 | 1 week ago |
|
bef6f36755 | 1 week ago |
|
6125991b78 | 1 week ago |
|
64bfa02db4 | 2 weeks ago |
|
1e662e5ed9 | 2 weeks ago |
|
df57392f48 | 2 weeks ago |
|
19cd02e548 | 2 weeks ago |
|
8bc7822fe5 | 2 weeks ago |
|
e97da26435 | 2 weeks ago |
|
1a89fa419e | 2 weeks ago |
|
7c0e70b9cc | 2 weeks ago |
|
ed9ee95dbe | 2 weeks ago |
|
63a38ab228 | 2 weeks ago |
|
c2a883e25a | 2 weeks ago |
|
24ae50cfd5 | 2 weeks ago |
|
0573138e38 | 2 weeks ago |
|
2f14313646 | 2 weeks ago |
|
e135336aae | 2 weeks ago |
|
64eeda58e6 | 2 weeks ago |
|
acdf523c54 | 2 weeks ago |
|
e2abf8e358 | 2 weeks ago |
|
d340f80d75 | 2 weeks ago |
|
76d36cb429 | 2 weeks ago |
|
a7fadcd344 | 2 weeks ago |
|
f19f8611f4 | 1 month ago |
|
8cccb90f90 | 1 month ago |
|
1408bb8294 | 1 month ago |
|
45837d2d1b | 1 month ago |
|
ccb9d12927 | 2 months ago |
|
8b95a09319 | 2 months ago |
|
8176d88801 | 2 months ago |
|
2f850743fa | 2 months ago |
|
4e53b6cb8d | 2 months ago |
|
0bb2e3929f | 2 months ago |
|
82b38dfa68 | 2 months ago |
|
b3b404ed30 | 2 months ago |
|
45990633e6 | 2 months ago |
|
97937c55bf | 2 months ago |
|
f79c44ee0a | 2 months ago |
|
16eb212609 | 2 months ago |
|
5da5186b3b | 2 months ago |
|
158618e632 | 2 months ago |
|
81bd619abd | 2 months ago |
|
d2aa9fb996 | 2 months ago |
|
315dad8682 | 2 months ago |
|
600ec37524 | 2 months ago |
|
1af7e08f07 | 2 months ago |
|
61a19cac84 | 2 months ago |
|
fa8ef5b9d1 | 2 months ago |
|
eb5904fb9d | 3 months ago |
|
fda72a014c | 3 months ago |
|
f4d6934a6f | 3 months ago |
|
545b338004 | 3 months ago |
|
a8425f50bd | 3 months ago |
|
24bf751d4d | 3 months ago |
|
cf157ad8a3 | 3 months ago |
|
5a4bc9410b | 3 months ago |
|
de594183bd | 3 months ago |
|
4c343893c5 | 3 months ago |
|
8ae0aaa46c | 3 months ago |
|
6b3a1134bd | 3 months ago |
|
40a9b495b2 | 3 months ago |
|
1d34e5355b | 3 months ago |
|
00d0e1af25 | 3 months ago |
|
9f29702f54 | 3 months ago |
|
7626cd0c86 | 3 months ago |
|
5291902fd7 | 3 months ago |
|
1757d964c0 | 3 months ago |
|
999f61c02e | 3 months ago |
|
5eb43e4566 | 3 months ago |
|
ec3804cc6f | 3 months ago |
|
4c3aed9faf | 3 months ago |
|
06e3047a2f | 3 months ago |
|
99e6791f4b | 3 months ago |
|
9cad95dda5 | 3 months ago |
|
76c584e751 | 3 months ago |
|
cd4244ae65 | 3 months ago |
|
1d6137d39d | 3 months ago |
|
be8acc0cfb | 3 months ago |
|
2f5f40d593 | 3 months ago |
|
4172a8a7f9 | 3 months ago |
|
4addf8a528 | 3 months ago |
|
1df7697811 | 3 months ago |
|
4c66d37545 | 4 months ago |
|
481c3c6e1e | 4 months ago |
|
1d1d96b489 | 4 months ago |
|
0b972771fd | 4 months ago |
|
650732109e | 4 months ago |
|
79fed691ca | 4 months ago |
|
b37ba736fa | 4 months ago |
|
65766ff4fc | 4 months ago |
|
19d9b87c62 | 4 months ago |
|
d82ec5a211 | 4 months ago |
|
5e5ffdbcc3 | 4 months ago |
|
13ec11da58 | 4 months ago |
|
2948d5e70f | 4 months ago |
|
bb9a119456 | 4 months ago |
|
22ac16f3a1 | 4 months ago |
|
79a654d605 | 4 months ago |
|
a421ce4266 | 4 months ago |
|
4b42c9e746 | 4 months ago |
|
5ffca1b157 | 4 months ago |
|
0951061b5e | 4 months ago |
|
ad9d63ac52 | 4 months ago |
|
dccc658273 | 4 months ago |
|
ef5389cd56 | 4 months ago |
|
3f63b3e864 | 4 months ago |
|
656d9d892d | 4 months ago |
|
e979df122a | 4 months ago |
|
8804b856ea | 4 months ago |
|
3ba170e4d4 | 4 months ago |
|
6150fe9942 | 4 months ago |
|
3e80c5809e | 4 months ago |
|
8928ac7d39 | 4 months ago |
|
289645f142 | 4 months ago |
|
8d9cbe7693 | 4 months ago |
|
392a33d425 | 4 months ago |
|
6af448e037 | 4 months ago |
|
ac66adc24c | 4 months ago |
|
0a64800784 | 4 months ago |
|
941af6a648 | 4 months ago |
|
a6b5013649 | 5 months ago |
|
c18ab38877 | 5 months ago |
|
8738712cfa | 5 months ago |
|
8816c5f7de | 5 months ago |
|
e9e15c5f7a | 5 months ago |
|
5b582917ec | 5 months ago |
|
d9b66f6959 | 5 months ago |
|
1b98e16940 | 5 months ago |
|
0c73420ccf | 5 months ago |
|
8cb7188919 | 5 months ago |
|
72a2866508 | 5 months ago |
|
912718103c | 5 months ago |
|
a7e41df1e3 | 5 months ago |
|
c436708a13 | 5 months ago |
|
3f4743037b | 5 months ago |
|
7b551b0d35 | 5 months ago |
|
bb8a10bab8 | 5 months ago |
|
09af0becc5 | 5 months ago |
|
d84bff7d1b | 5 months ago |
|
a4c513487e | 5 months ago |
|
2046003714 | 5 months ago |
|
f07ee355ea | 5 months ago |
|
5e02724e49 | 5 months ago |
|
e5926bcaad | 5 months ago |
|
355f2bc5f3 | 5 months ago |
|
7e8e0ab772 | 5 months ago |
|
f0fecf7399 | 6 months ago |
|
54db4ffc8b | 6 months ago |
|
73fff7404f | 6 months ago |
|
24057743bb | 6 months ago |
|
04d87be082 | 7 months ago |
|
e7c6ebccc3 | 7 months ago |
|
48382f885b | 7 months ago |
|
511d8346f2 | 7 months ago |
|
f0e8e84ee0 | 7 months ago |
|
c277fbf14e | 7 months ago |
|
28570296a9 | 7 months ago |
|
39ec0cb594 | 7 months ago |
@ -0,0 +1,5 @@
|
|||||||
|
annotations:
|
||||||
|
- checks:
|
||||||
|
- dangerous-workflow
|
||||||
|
reasons:
|
||||||
|
- reason: not-applicable # This workflow does not run untrusted code, the bot will only backport a code if the a PR was approved and merged into main.
|
@ -0,0 +1,68 @@
|
|||||||
|
//go:build e2e
|
||||||
|
// +build e2e
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright 2025 The Flux authors
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestCreateTenant(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
args string
|
||||||
|
assert assertFunc
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: "no args",
|
||||||
|
args: "create tenant",
|
||||||
|
assert: assertError("name is required"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "no namespace",
|
||||||
|
args: "create tenant dev-team --cluster-role=cluster-admin",
|
||||||
|
assert: assertError("with-namespace is required"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "basic tenant",
|
||||||
|
args: "create tenant dev-team --with-namespace=apps --cluster-role=cluster-admin --export",
|
||||||
|
assert: assertGoldenFile("./testdata/create_tenant/tenant-basic.yaml"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tenant with custom serviceaccount",
|
||||||
|
args: "create tenant dev-team --with-namespace=apps --cluster-role=cluster-admin --with-service-account=flux-tenant --export",
|
||||||
|
assert: assertGoldenFile("./testdata/create_tenant/tenant-with-service-account.yaml"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tenant with custom cluster role",
|
||||||
|
args: "create tenant dev-team --with-namespace=apps --cluster-role=custom-role --export",
|
||||||
|
assert: assertGoldenFile("./testdata/create_tenant/tenant-with-cluster-role.yaml"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
cmd := cmdTestCase{
|
||||||
|
args: tt.args,
|
||||||
|
assert: tt.assert,
|
||||||
|
}
|
||||||
|
cmd.runTestCmd(t)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,184 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2025 The Flux authors
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||||
|
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||||
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||||
|
"k8s.io/client-go/util/retry"
|
||||||
|
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||||
|
|
||||||
|
"github.com/fluxcd/flux2/v2/internal/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
var migrateCmd = &cobra.Command{
|
||||||
|
Use: "migrate",
|
||||||
|
Args: cobra.NoArgs,
|
||||||
|
Short: "Migrate the Flux custom resources to their latest API version",
|
||||||
|
Long: `The migrate command must be run before a Flux minor version upgrade.
|
||||||
|
The command migrates the Flux custom resources stored in Kubernetes etcd to their latest API version,
|
||||||
|
ensuring the Flux components can continue to function correctly after the upgrade.
|
||||||
|
`,
|
||||||
|
RunE: runMigrateCmd,
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
rootCmd.AddCommand(migrateCmd)
|
||||||
|
}
|
||||||
|
|
||||||
|
func runMigrateCmd(cmd *cobra.Command, args []string) error {
|
||||||
|
logger.Actionf("starting migration of custom resources")
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), rootArgs.timeout)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
cfg, err := utils.KubeConfig(kubeconfigArgs, kubeclientOptions)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("Kubernetes client initialization failed: %s", err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
kubeClient, err := client.New(cfg, client.Options{Scheme: utils.NewScheme()})
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
migrator := NewMigrator(kubeClient, client.MatchingLabels{
|
||||||
|
"app.kubernetes.io/part-of": "flux",
|
||||||
|
})
|
||||||
|
|
||||||
|
if err := migrator.Run(ctx); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.Successf("custom resources migrated successfully")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type Migrator struct {
|
||||||
|
labelSelector client.MatchingLabels
|
||||||
|
kubeClient client.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewMigrator creates a new Migrator instance with the specified label selector.
|
||||||
|
func NewMigrator(kubeClient client.Client, labelSelector client.MatchingLabels) *Migrator {
|
||||||
|
return &Migrator{
|
||||||
|
labelSelector: labelSelector,
|
||||||
|
kubeClient: kubeClient,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Migrator) Run(ctx context.Context) error {
|
||||||
|
crdList := &apiextensionsv1.CustomResourceDefinitionList{}
|
||||||
|
|
||||||
|
if err := m.kubeClient.List(ctx, crdList, m.labelSelector); err != nil {
|
||||||
|
return fmt.Errorf("failed to list CRDs: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, crd := range crdList.Items {
|
||||||
|
if err := m.migrateCRD(ctx, crd.Name); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Migrator) migrateCRD(ctx context.Context, name string) error {
|
||||||
|
crd := &apiextensionsv1.CustomResourceDefinition{}
|
||||||
|
|
||||||
|
if err := m.kubeClient.Get(ctx, client.ObjectKey{Name: name}, crd); err != nil {
|
||||||
|
return fmt.Errorf("failed to get CRD %s: %w", name, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// get the latest storage version for the CRD
|
||||||
|
storageVersion := m.getStorageVersion(crd)
|
||||||
|
if storageVersion == "" {
|
||||||
|
return fmt.Errorf("no storage version found for CRD %s", name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// migrate all the resources for the CRD
|
||||||
|
err := retry.RetryOnConflict(retry.DefaultRetry, func() error {
|
||||||
|
return m.migrateCR(ctx, crd, storageVersion)
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to migrate resources for CRD %s: %w", name, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// set the CRD status to contain only the latest storage version
|
||||||
|
if len(crd.Status.StoredVersions) > 1 || crd.Status.StoredVersions[0] != storageVersion {
|
||||||
|
crd.Status.StoredVersions = []string{storageVersion}
|
||||||
|
if err := m.kubeClient.Status().Update(ctx, crd); err != nil {
|
||||||
|
return fmt.Errorf("failed to update CRD %s status: %w", crd.Name, err)
|
||||||
|
}
|
||||||
|
logger.Successf("%s migrated to storage version %s", crd.Name, storageVersion)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// migrateCR migrates all CRs for the given CRD to the specified version by patching them with an empty patch.
|
||||||
|
func (m *Migrator) migrateCR(ctx context.Context, crd *apiextensionsv1.CustomResourceDefinition, version string) error {
|
||||||
|
list := &unstructured.UnstructuredList{}
|
||||||
|
|
||||||
|
apiVersion := crd.Spec.Group + "/" + version
|
||||||
|
listKind := crd.Spec.Names.ListKind
|
||||||
|
|
||||||
|
list.SetAPIVersion(apiVersion)
|
||||||
|
list.SetKind(listKind)
|
||||||
|
|
||||||
|
err := m.kubeClient.List(ctx, list, client.InNamespace(""))
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to list resources for CRD %s: %w", crd.Name, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(list.Items) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, item := range list.Items {
|
||||||
|
// patch the resource with an empty patch to update the version
|
||||||
|
if err := m.kubeClient.Patch(
|
||||||
|
ctx,
|
||||||
|
&item,
|
||||||
|
client.RawPatch(client.Merge.Type(), []byte("{}")),
|
||||||
|
); err != nil && !apierrors.IsNotFound(err) {
|
||||||
|
return fmt.Errorf(" %s/%s/%s failed to migrate: %w",
|
||||||
|
item.GetKind(), item.GetNamespace(), item.GetName(), err)
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.Successf("%s/%s/%s migrated to version %s",
|
||||||
|
item.GetKind(), item.GetNamespace(), item.GetName(), version)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// getStorageVersion retrieves the storage version of a CustomResourceDefinition.
|
||||||
|
func (m *Migrator) getStorageVersion(crd *apiextensionsv1.CustomResourceDefinition) string {
|
||||||
|
var version string
|
||||||
|
for _, v := range crd.Spec.Versions {
|
||||||
|
if v.Storage {
|
||||||
|
version = v.Name
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return version
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2025 The Flux authors
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/google/go-containerregistry/pkg/crane"
|
||||||
|
|
||||||
|
"github.com/fluxcd/pkg/auth"
|
||||||
|
"github.com/fluxcd/pkg/auth/azure"
|
||||||
|
authutils "github.com/fluxcd/pkg/auth/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
// loginWithProvider gets a crane authentication option for the given provider and URL.
|
||||||
|
func loginWithProvider(ctx context.Context, url, provider string) (crane.Option, error) {
|
||||||
|
var opts []auth.Option
|
||||||
|
if provider == azure.ProviderName {
|
||||||
|
opts = append(opts, auth.WithAllowShellOut())
|
||||||
|
}
|
||||||
|
authenticator, err := authutils.GetArtifactRegistryCredentials(ctx, provider, url, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("could not login to provider %s with url %s: %w", provider, url, err)
|
||||||
|
}
|
||||||
|
return crane.WithAuth(authenticator), nil
|
||||||
|
}
|
@ -1,3 +1,3 @@
|
|||||||
► checking prerequisites
|
► checking prerequisites
|
||||||
✔ Kubernetes {{ .serverVersion }} >=1.30.0-0
|
✔ Kubernetes {{ .serverVersion }} >=1.31.0-0
|
||||||
✔ prerequisites checks passed
|
✔ prerequisites checks passed
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: apps
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: dev-team
|
||||||
|
namespace: apps
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: dev-team-reconciler
|
||||||
|
namespace: apps
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cluster-admin
|
||||||
|
subjects:
|
||||||
|
- apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: User
|
||||||
|
name: gotk:apps:reconciler
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: dev-team
|
||||||
|
namespace: apps
|
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: apps
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: dev-team
|
||||||
|
namespace: apps
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: dev-team-reconciler
|
||||||
|
namespace: apps
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: custom-role
|
||||||
|
subjects:
|
||||||
|
- apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: User
|
||||||
|
name: gotk:apps:reconciler
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: dev-team
|
||||||
|
namespace: apps
|
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: apps
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: flux-tenant
|
||||||
|
namespace: apps
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
toolkit.fluxcd.io/tenant: dev-team
|
||||||
|
name: dev-team-reconciler
|
||||||
|
namespace: apps
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cluster-admin
|
||||||
|
subjects:
|
||||||
|
- apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: User
|
||||||
|
name: gotk:apps:reconciler
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: flux-tenant
|
||||||
|
namespace: apps
|
@ -0,0 +1,2 @@
|
|||||||
|
# History documentation: https://fluxcd.io/flux/components/helm/helmreleases/#helmrelease-status
|
||||||
|
[]
|
@ -0,0 +1,25 @@
|
|||||||
|
# History documentation: https://fluxcd.io/flux/components/helm/helmreleases/#helmrelease-status
|
||||||
|
- appVersion: 6.0.0
|
||||||
|
chartName: podinfo
|
||||||
|
chartVersion: 6.0.0
|
||||||
|
configDigest: sha256:abc123
|
||||||
|
deleted: "2024-01-01T10:00:00Z"
|
||||||
|
digest: sha256:def456
|
||||||
|
firstDeployed: "2024-01-01T09:00:00Z"
|
||||||
|
lastDeployed: "2024-01-01T10:00:00Z"
|
||||||
|
name: test-with-history
|
||||||
|
namespace: {{ .fluxns }}
|
||||||
|
status: superseded
|
||||||
|
version: 1
|
||||||
|
- appVersion: 6.1.0
|
||||||
|
chartName: podinfo
|
||||||
|
chartVersion: 6.1.0
|
||||||
|
configDigest: sha256:xyz789
|
||||||
|
deleted: null
|
||||||
|
digest: sha256:ghi012
|
||||||
|
firstDeployed: "2024-01-01T11:00:00Z"
|
||||||
|
lastDeployed: "2024-01-01T11:00:00Z"
|
||||||
|
name: test-with-history
|
||||||
|
namespace: {{ .fluxns }}
|
||||||
|
status: deployed
|
||||||
|
version: 2
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue