Skip to content

Commit

Permalink
Change local-rke2-state secret type
Browse files Browse the repository at this point in the history
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
  • Loading branch information
bk201 authored and guangbochen committed Jun 12, 2023
1 parent daf3859 commit 8b6ec82
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions pkg/resources/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@ import (
"strings"

v1 "github.com/rancher/rancher/pkg/apis/rke.cattle.io/v1"
"github.com/rancher/rancherd/pkg/config"
"github.com/rancher/rancherd/pkg/images"
"github.com/rancher/rancherd/pkg/kubectl"
"github.com/rancher/rancherd/pkg/self"
"github.com/rancher/rancherd/pkg/versions"
"github.com/rancher/system-agent/pkg/applyinator"
"github.com/rancher/wrangler/pkg/randomtoken"
"github.com/rancher/wrangler/pkg/yaml"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"

"github.com/rancher/rancherd/pkg/config"
"github.com/rancher/rancherd/pkg/images"
"github.com/rancher/rancherd/pkg/kubectl"
"github.com/rancher/rancherd/pkg/self"
"github.com/rancher/rancherd/pkg/versions"
)

const (
localRKEStateSecretType = "rke.cattle.io/cluster-state"
)

func writeCattleID(id string) error {
Expand Down Expand Up @@ -113,6 +118,7 @@ func ToBootstrapFile(config *config.Config, path string) (*applyinator.File, err
"name": "local-rke-state",
"namespace": "fleet-local",
},
"type": localRKEStateSecretType,
"data": map[string]interface{}{
"serverToken": []byte(token),
"agentToken": []byte(token),
Expand Down

0 comments on commit 8b6ec82

Please sign in to comment.