spi

package
v0.0.0-...-317aa01 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPIAccessTokenBindingPrefixName = "e2e-access-token-binding"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SPIController

type SPIController struct {
	*kubeCl.CustomClient
}

func NewSuiteController

func NewSuiteController(kube *kubeCl.CustomClient) (*SPIController, error)

func (*SPIController) CreateSPIAccessCheck

func (s *SPIController) CreateSPIAccessCheck(name, namespace, repoURL string) (*spi.SPIAccessCheck, error)

CreateSPIAccessCheck creates a SPIAccessCheck object

func (*SPIController) CreateSPIAccessTokenBinding

func (s *SPIController) CreateSPIAccessTokenBinding(name, namespace, repoURL, secretName string, secretType v1.SecretType) (*spi.SPIAccessTokenBinding, error)

CreateSPIAccessTokenBinding creates an SPIAccessTokenBinding object

func (*SPIController) CreateSPIAccessTokenBindingWithSA

func (s *SPIController) CreateSPIAccessTokenBindingWithSA(name, namespace, serviceAccountName, repoURL, secretName string, isImagePullSecret, isManagedServiceAccount bool) (*spi.SPIAccessTokenBinding, error)

CreateSPIAccessTokenBindingWithSA creates SPIAccessTokenBinding with secret linked to a service account There are three ways of linking a secret to a service account: - Linking a secret to an existing service account - Linking a secret to an existing service account as image pull secret - Using a managed service account

func (*SPIController) CreateSPIFileContentRequest

func (s *SPIController) CreateSPIFileContentRequest(name, namespace, repoURL, filePath string) (*spi.SPIFileContentRequest, error)

CreateSPIFileContentRequest creates an SPIFileContentRequest Object

func (*SPIController) DeleteAllAccessChecksInASpecificNamespace

func (s *SPIController) DeleteAllAccessChecksInASpecificNamespace(namespace string) error

DeleteAllSPIAccessChecksInASpecificNamespace deletes all SPIAccessCheck from a given namespace

func (*SPIController) DeleteAllAccessTokenDataInASpecificNamespace

func (s *SPIController) DeleteAllAccessTokenDataInASpecificNamespace(namespace string) error

Remove all SPIAccessTokenDataUpdate from a given namespace. Useful when creating a lot of resources and wanting to remove all of them

func (*SPIController) DeleteAllAccessTokensInASpecificNamespace

func (s *SPIController) DeleteAllAccessTokensInASpecificNamespace(namespace string) error

Remove all SPIAccessToken from a given namespace. Useful when creating a lot of resources and wanting to remove all of them

func (*SPIController) DeleteAllBindingTokensInASpecificNamespace

func (s *SPIController) DeleteAllBindingTokensInASpecificNamespace(namespace string) error

Remove all SPIAccessTokenBinding from a given namespace. Useful when creating a lot of resources and wanting to remove all of them

func (*SPIController) GetSPIAccessCheck

func (s *SPIController) GetSPIAccessCheck(name, namespace string) (*spi.SPIAccessCheck, error)

GetSPIAccessCheck returns the requested SPIAccessCheck object

func (*SPIController) GetSPIAccessToken

func (s *SPIController) GetSPIAccessToken(name, namespace string) (*spi.SPIAccessToken, error)

GetSPIAccessTokenBinding returns the requested SPIAccessTokenBinding object

func (*SPIController) GetSPIAccessTokenBinding

func (s *SPIController) GetSPIAccessTokenBinding(name, namespace string) (*spi.SPIAccessTokenBinding, error)

GetSPIAccessTokenBinding returns the requested SPIAccessTokenBinding object

func (*SPIController) GetSPIFileContentRequest

func (s *SPIController) GetSPIFileContentRequest(name, namespace string) (*spi.SPIFileContentRequest, error)

GetSPIAccessCheck returns the requested SPIAccessCheck object

func (*SPIController) InjectManualSPIToken

func (s *SPIController) InjectManualSPIToken(namespace string, repoUrl string, oauthCredentials string, secretType v1.SecretType, secretName string) string

Inject manually access tokens using spi API

func (*SPIController) IsSPIFileContentRequestInDeliveredPhase

func (s *SPIController) IsSPIFileContentRequestInDeliveredPhase(SPIFcr *spi.SPIFileContentRequest)

func (*SPIController) UploadWithK8sSecret

func (s *SPIController) UploadWithK8sSecret(secretName, namespace, spiTokenName, providerURL, username, tokenData string) (*v1.Secret, error)

UploadWithK8sSecret returns the requested Secret object

func (*SPIController) UploadWithRestEndpoint

func (s *SPIController) UploadWithRestEndpoint(uploadURL string, oauthCredentials string, bearerToken string) (int, error)

Perform http POST call to upload a token at the given upload URL

Jump to

Keyboard shortcuts

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