team

package
v0.0.0-...-afa2e87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TeamGraphMicrosoftServiceEntry = &v1beta1.ServiceEntry{
	ObjectMeta: metav1.ObjectMeta{
		Name:      "team-graph-microsoft",
		Namespace: "team-onboarding",
	},
	Spec: v1beta11.ServiceEntry{
		ExportTo: []string{"."},
		Hosts:    []string{"graph.microsoft.com"},
		Ports: []*v1beta11.ServicePort{{
			Name:     "https",
			Number:   uint32(0x1bb),
			Protocol: "HTTPS",
		}},
		Resolution: v1beta11.ServiceEntry_Resolution(int32(2)),
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "networking.istio.io/v1beta1",
		Kind:       "ServiceEntry",
	},
}
View Source
var TeamOnboardingAuthSecretProviderClass = &v1.SecretProviderClass{
	ObjectMeta: metav1.ObjectMeta{Name: "team-onboarding-auth"},
	Spec: v1.SecretProviderClassSpec{
		Parameters: map[string]string{
			"objects": `- objectName: "xxx-gh-token"
  secretPath: "team-onboarding-kv/data/github-xxx-bot"
  secretKey: "token"
- objectName: "xxx-gh-username"
  secretPath: "team-onboarding-kv/data/github-xxx-bot"
  secretKey: "username"
- objectName: "harbor-username"
  secretPath: "team-onboarding-kv/data/harbor"
  secretKey: "username"
- objectName: "harbor-password"
  secretPath: "team-onboarding-kv/data/harbor"
  secretKey: "password"
- objectName: "sendgrid-api-key"
  secretPath: "team-onboarding-kv/data/sendgrid-api-key"
  secretKey: "token"
- objectName: "key-id"
  secretPath: "team-onboarding-kv/data/lakefs-xxx-admin"
  secretKey: "access-key-id"
- objectName: "secret-key"
  secretPath: "team-onboarding-kv/data/lakefs-xxx-admin"
  secretKey: "secret-access-key"
- objectName: "abk-vcc-test-xxx-xxx-gh-dev-token"
  secretPath: "team-onboarding-kv/data/abk-vcc-test-xxx-bot"
  secretKey: "token"
- objectName: "abk-vcc-test-xxx-gh-dev-username"
  secretPath: "team-onboarding-kv/data/abk-vcc-test-xxx-bot"
  secretKey: "username"
- objectName: "scim-auth-token"
  secretPath: "team-onboarding-kv/data/scim-token"
  secretKey: "token"
- objectName: "team-az-group-management-prod"
  secretPath: "team-onboarding-kv/data/team-az-group-management-prod"
  secretKey: "client-secret"
- objectName: "team-az-group-management-qa"
  secretPath: "team-onboarding-kv/data/team-az-group-management-qa"
  secretKey: "client-secret"
`,
			"roleName":     "team-onboarding-policy-read",
			"vaultAddress": "https://vault.secretstore.company.com",
		},
		Provider: v1.Provider("vault"),
		SecretObjects: []*v1.SecretObject{{
			Data: []*v1.SecretObjectData{{
				Key:        "token",
				ObjectName: "xxx-gh-token",
			}, {
				Key:        "username",
				ObjectName: "xxx-gh-username",
			}},
			SecretName: "github-auth",
			Type:       "Opaque",
		}, {
			Data: []*v1.SecretObjectData{{
				Key:        "token",
				ObjectName: "abk-vcc-test-xxx-xxx-gh-dev-token",
			}, {
				Key:        "username",
				ObjectName: "abk-vcc-test-xxx-gh-dev-username",
			}},
			SecretName: "github-abk-vcc-test-auth",
			Type:       "Opaque",
		}, {
			Data: []*v1.SecretObjectData{{
				Key:        "token",
				ObjectName: "scim-auth-token",
			}},
			SecretName: "scim-auth",
			Type:       "Opaque",
		}, {
			Data: []*v1.SecretObjectData{{
				Key:        "username",
				ObjectName: "harbor-username",
			}, {
				Key:        "password",
				ObjectName: "harbor-password",
			}},
			SecretName: "harbor-auth",
			Type:       "Opaque",
		}, {
			Data: []*v1.SecretObjectData{{
				Key:        "access-key-id",
				ObjectName: "key-id",
			}, {
				Key:        "secret-access-key",
				ObjectName: "secret-key",
			}},
			SecretName: "lakefs-auth",
			Type:       "Opaque",
		}, {
			Data: []*v1.SecretObjectData{{
				Key:        "token",
				ObjectName: "sendgrid-api-key",
			}},
			SecretName: "sendgrid-api-key",
			Type:       "Opaque",
		}, {
			Data: []*v1.SecretObjectData{{
				Key:        "client-secret",
				ObjectName: "team-az-group-management-prod",
			}},
			SecretName: "team-az-group-management-prod",
			Type:       "Opaque",
		}, {
			Data: []*v1.SecretObjectData{{
				Key:        "client-secret",
				ObjectName: "team-az-group-management-qa",
			}},
			SecretName: "team-az-group-management-qa",
			Type:       "Opaque",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "secrets-store.csi.x-k8s.io/v1",
		Kind:       "SecretProviderClass",
	},
}

Functions

func Apply

func Apply(ctx context.Context, km kube.Exporter) error

Apply applies the kubernetes objects contained in Exporter to the cluster

func P

func P[T any](t T) *T

P converts T to *T, useful for basic types

Types

type Team

type Team struct {
	kube.App

	TeamGraphMicrosoftServiceEntry        *networkingv1beta1.ServiceEntry
	TeamOnboardingAuthSecretProviderClass *secretsstorecsidriverapisv1.SecretProviderClass
}

Team contains kubernetes manifests

func New

func New() *Team

New creates a new Team

func (*Team) Apply

func (a *Team) Apply(ctx context.Context) error

Apply applies the kubernetes objects to the cluster

func (*Team) Export

func (a *Team) Export(dir string) error

Export exports the kubernetes objects to YAML files in the given directory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL