Add github-upstream-observer Controller

This commit is contained in:
Benjamin A. Petersen
2024-03-26 12:51:33 -04:00
parent 6ac11a554a
commit a11e1527f0
7 changed files with 225 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
// Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package upstreamoidc implements an abstraction of upstream GitHub provider interactions.
package upstreamgithub
import (
"k8s.io/apimachinery/pkg/types"
"go.pinniped.dev/internal/federationdomain/upstreamprovider"
)
// ProviderConfig holds the active configuration of an upstream GitHub provider.
type ProviderConfig struct {
Name string
ResourceUID types.UID
UsernameClaim string
GroupsClaim string
}
var _ upstreamprovider.UpstreamGithubIdentityProviderI = (*ProviderConfig)(nil)
func (p *ProviderConfig) GetResourceUID() types.UID {
return p.ResourceUID
}
func (p *ProviderConfig) GetName() string {
return p.Name
}

View File

@@ -0,0 +1,4 @@
// Copyright 2020-2024 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package upstreamgithub