cmd

package
v0.0.0-...-0afc6dc Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.0.0"

Version of the plugin

Variables

This section is empty.

Functions

func NewCmdGitLabBootstrap

func NewCmdGitLabBootstrap(streams genericclioptions.IOStreams) *cobra.Command

NewCmdGitLabBootstrap creates and returns a new command

Types

type GitLabBootstrapOptions

type GitLabBootstrapOptions struct {
	ConfigFlags *genericclioptions.ConfigFlags

	GitLabAPIToken     string
	GitLabProjectID    string
	GitLabURL          string
	GitLabGroupCluster bool

	KubeConfig    string
	RestConfig    *restclient.Config
	KubeAPI       *clientcmdapi.Config
	KubeClientSet *kubernetes.Clientset

	ClusterName string
	ClusterHost string
	ClusterCA   string

	ServiceAccountToken string

	GitLabAPI *gitlab.Client

	genericclioptions.IOStreams
}

GitLabBootstrapOptions holds configs used to make requests

func NewGitLabBootstrapOptions

func NewGitLabBootstrapOptions(streams genericclioptions.IOStreams) *GitLabBootstrapOptions

NewGitLabBootstrapOptions provides an instance of GitLabBootstrapOptions with default values

func (*GitLabBootstrapOptions) AddClusterToGitLab

func (o *GitLabBootstrapOptions) AddClusterToGitLab() error

AddClusterToGitLab adds the Kubernetes cluster to the GitLab project

func (*GitLabBootstrapOptions) Complete

func (o *GitLabBootstrapOptions) Complete(cmd *cobra.Command, args []string) error

Complete sets all configs required

func (*GitLabBootstrapOptions) CreateClusterRoleBinding

func (o *GitLabBootstrapOptions) CreateClusterRoleBinding() error

CreateClusterRoleBinding creates the gitlab-admin ClusterRoleBinding

func (*GitLabBootstrapOptions) CreateServiceAccount

func (o *GitLabBootstrapOptions) CreateServiceAccount() error

CreateServiceAccount creates the gitlab-admin ServiceAccount

func (*GitLabBootstrapOptions) Run

func (o *GitLabBootstrapOptions) Run() error

Run executes the command

func (*GitLabBootstrapOptions) SaveServiceAccountToken

func (o *GitLabBootstrapOptions) SaveServiceAccountToken() error

SaveServiceAccountToken saves the gitlab-admin ServiceAccount token

func (*GitLabBootstrapOptions) Validate

func (o *GitLabBootstrapOptions) Validate() error

Validate ensures that all configs are valid

Jump to

Keyboard shortcuts

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