Documentation ¶
Index ¶
- type Resource
- func (s *Resource) GetInputTaskModifier(ts *v1beta1.TaskSpec, path string) (v1beta1.TaskModifier, error)
- func (s Resource) GetName() string
- func (s *Resource) GetOutputTaskModifier(_ *v1beta1.TaskSpec, _ string) (v1beta1.TaskModifier, error)
- func (s Resource) GetType() resource.PipelineResourceType
- func (s *Resource) GetURL() string
- func (s *Resource) Replacements() map[string]string
- func (s Resource) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resource ¶
type Resource struct { Name string `json:"name"` Type resource.PipelineResourceType `json:"type"` // URL must be a host string URL string `json:"url"` Revision string `json:"revision"` // Server requires Basic authentication Username string `json:"username"` Password string `json:"password"` Namespace string `json:"namespace"` // Server requires Bearer authentication. This client will not attempt to use // refresh tokens for an OAuth2 flow. // Token overrides userame and password Token string `json:"token"` // Server should be accessed without verifying the TLS certificate. For testing only. Insecure bool // CAData holds PEM-encoded bytes (typically read from a root certificates bundle). // CAData takes precedence over CAFile CAData []byte `json:"cadata"` // ClientKeyData contains PEM-encoded data from a client key file for TLS. ClientKeyData []byte `json:"clientKeyData"` // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. ClientCertificateData []byte `json:"clientCertificateData"` //Secrets holds a struct to indicate a field name and corresponding secret name to populate it Secrets []resource.SecretParam `json:"secrets"` KubeconfigWriterImage string `json:"-"` ShellImage string `json:"-"` }
Resource represents a cluster configuration (kubeconfig) that can be accessed by tasks in the pipeline
func NewResource ¶
func NewResource(name string, kubeconfigWriterImage, shellImage string, r *resource.PipelineResource) (*Resource, error)
NewResource create a new k8s cluster resource to pass to a pipeline task
func (*Resource) GetInputTaskModifier ¶
func (s *Resource) GetInputTaskModifier(ts *v1beta1.TaskSpec, path string) (v1beta1.TaskModifier, error)
GetInputTaskModifier returns the TaskModifier to be used when this resource is an input.
func (*Resource) GetOutputTaskModifier ¶
func (s *Resource) GetOutputTaskModifier(_ *v1beta1.TaskSpec, _ string) (v1beta1.TaskModifier, error)
GetOutputTaskModifier returns a No-op TaskModifier.
func (Resource) GetType ¶
func (s Resource) GetType() resource.PipelineResourceType
GetType returns the type of the resource, in this case "cluster"
func (*Resource) Replacements ¶
Replacements is used for template replacement on a ClusterResource inside of a Taskrun.
Click to show internal directories.
Click to hide internal directories.