mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
29 lines
797 B
Go
29 lines
797 B
Go
// Copyright (c) 2023 Gitpod GmbH. All rights reserved.
|
|
// Licensed under the GNU Affero General Public License (AGPL).
|
|
// See License.AGPL.txt in the project root for license information.
|
|
|
|
package server
|
|
|
|
import (
|
|
_ "embed"
|
|
|
|
"github.com/gitpod-io/gitpod/installer/pkg/common"
|
|
corev1 "k8s.io/api/core/v1"
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
func AdminSecret(ctx *common.RenderContext) ([]runtime.Object, error) {
|
|
return []runtime.Object{&corev1.Secret{
|
|
TypeMeta: common.TypeMetaSecret,
|
|
ObjectMeta: metav1.ObjectMeta{
|
|
Name: AdminSecretName,
|
|
Namespace: ctx.Namespace,
|
|
Labels: common.DefaultLabels(Component),
|
|
},
|
|
Data: map[string][]byte{
|
|
AdminSecretLoginKeyName: []byte(ctx.Values.ServerAdminLoginKey),
|
|
},
|
|
}}, nil
|
|
}
|