Documentation ¶
Index ¶
- Constants
- Variables
- func Instance(pod *corev1.Pod, env string) *model.Instance
- func Message(job *batchv1.Job) string
- type Client
- func (c *Client) App(ctx context.Context, name, team, env string) (*model.App, error)
- func (c *Client) AppExists(env, team, app string) bool
- func (c *Client) Apps(ctx context.Context, team string, filter ...EnvFilter) ([]*model.App, error)
- func (c *Client) AppsUsingSecret(ctx context.Context, obj *model.Secret) ([]*model.App, error)
- func (c *Client) CreateSecret(ctx context.Context, name string, team slug.Slug, env string, ...) (*model.Secret, error)
- func (c *Client) DeleteApp(ctx context.Context, name, team, env string) error
- func (c *Client) DeleteJob(ctx context.Context, name, team, env string) error
- func (c *Client) DeleteSecret(ctx context.Context, name string, team slug.Slug, env string) (bool, error)
- func (c *Client) Informers() ClusterInformers
- func (c *Client) Instances(ctx context.Context, team, env, name string) ([]*model.Instance, error)
- func (c *Client) Log(ctx context.Context, cluster, namespace, pod, container string, ...) ([]*model.LogLine, error)
- func (c *Client) LogStream(ctx context.Context, cluster, namespace, selector, container string, ...) (<-chan *model.LogLine, error)
- func (c *Client) Manifest(ctx context.Context, name, team, env string) (string, error)
- func (c *Client) NaisJob(ctx context.Context, name, team, env string) (*model.NaisJob, error)
- func (c *Client) NaisJobManifest(ctx context.Context, name, team, env string) (string, error)
- func (c *Client) NaisJobs(ctx context.Context, team string) ([]*model.NaisJob, error)
- func (c *Client) NaisJobsUsingSecret(ctx context.Context, obj *model.Secret) ([]*model.NaisJob, error)
- func (c *Client) Persistence(ctx context.Context, workload model.WorkloadBase) ([]model.Persistence, error)
- func (c *Client) RestartApp(ctx context.Context, name, team, env string) error
- func (c *Client) Runs(ctx context.Context, team, env, name string) ([]*model.Run, error)
- func (c *Client) Search(ctx context.Context, q string, filter *model.SearchFilter) []*search.Result
- func (c *Client) Secret(ctx context.Context, name string, team slug.Slug, env string) (*model.Secret, error)
- func (c *Client) Secrets(ctx context.Context, team slug.Slug) ([]*model.Secret, error)
- func (c *Client) SecretsForApp(ctx context.Context, obj *model.App) ([]*model.Secret, error)
- func (c *Client) SecretsForEnv(ctx context.Context, team slug.Slug, env string) ([]*model.Secret, error)
- func (c *Client) SecretsForNaisJob(ctx context.Context, obj *model.NaisJob) ([]*model.Secret, error)
- func (c *Client) SupportsSearchFilter(filter *model.SearchFilter) bool
- func (c *Client) ToNaisJob(u *unstructured.Unstructured, env string) (*model.NaisJob, error)
- func (c *Client) UpdateSecret(ctx context.Context, name string, team slug.Slug, env string, ...) (*model.Secret, error)
- type ClusterConfigMap
- type ClusterInformers
- type Config
- type Database
- type EnvFilter
- type Informers
- type Opt
- type StaticCluster
Constants ¶
View Source
const (
GoogleAuthPlugin = "google" // so that this is different than "gcp" that's already in client-go tree.
)
Variables ¶
View Source
var ErrSecretUnmanaged = errors.New("secret is not managed by console")
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AppExists ¶
AppExists returns true if the given app exists in the given environment. The app informer should be synced before calling this function.
func (*Client) AppsUsingSecret ¶
func (*Client) CreateSecret ¶
func (*Client) DeleteSecret ¶
func (*Client) Informers ¶
func (c *Client) Informers() ClusterInformers
Informers returns a map of informers, keyed by environment
func (*Client) NaisJobManifest ¶
func (*Client) NaisJobsUsingSecret ¶
func (*Client) Persistence ¶
func (c *Client) Persistence(ctx context.Context, workload model.WorkloadBase) ([]model.Persistence, error)
func (*Client) RestartApp ¶
func (*Client) SecretsForApp ¶
func (*Client) SecretsForEnv ¶
func (c *Client) SecretsForEnv(ctx context.Context, team slug.Slug, env string) ([]*model.Secret, error)
SecretsForEnv lists all secrets for a given team in a specific environment
func (*Client) SecretsForNaisJob ¶
func (*Client) SupportsSearchFilter ¶
func (c *Client) SupportsSearchFilter(filter *model.SearchFilter) bool
func (*Client) ToNaisJob ¶
func (c *Client) ToNaisJob(u *unstructured.Unstructured, env string) (*model.NaisJob, error)
type ClusterConfigMap ¶
func CreateClusterConfigMap ¶
func CreateClusterConfigMap(tenant string, cfg Config) (ClusterConfigMap, error)
type ClusterInformers ¶
func (ClusterInformers) Start ¶
func (c ClusterInformers) Start(ctx context.Context, log logrus.FieldLogger) error
type Config ¶
type Config struct { Clusters []string StaticClusters []StaticCluster }
Config is the configuration related to Kubernetes
func (*Config) IsStaticCluster ¶
type Informers ¶
type Informers struct { App informers.GenericInformer Event corev1inf.EventInformer Job batchv1inf.JobInformer Naisjob informers.GenericInformer Pod corev1inf.PodInformer Bucket informers.GenericInformer BigQuery informers.GenericInformer KafkaTopic informers.GenericInformer SqlInstance informers.GenericInformer SqlDatabase informers.GenericInformer OpenSearch informers.GenericInformer Redis informers.GenericInformer InfluxDb informers.GenericInformer }
type StaticCluster ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.