package storm

import "github.com/oslokommune/okctl/pkg/client/core/state/storm"

Package storm implements a state layer using the storm library

Index

Functions

func NewArgoCDState

func NewArgoCDState(node breeze.Client) client.ArgoCDState

NewArgoCDState returns an initialised state client

func NewCertificateState

func NewCertificateState(node breeze.Client) client.CertificateState

NewCertificateState returns an initialised state store

func NewClusterState

func NewClusterState(node breeze.Client) client.ClusterState

NewClusterState returns an initialised state client

func NewComponentState

func NewComponentState(node breeze.Client) client.ComponentState

NewComponentState returns an initialised state client

func NewContainerRepositoryState

func NewContainerRepositoryState(node breeze.Client) client.ContainerRepositoryState

NewContainerRepositoryState returns an initialised state client

func NewDomainState

func NewDomainState(db breeze.Client) client.DomainState

NewDomainState returns an initialised state store

func NewExternalDNSState

func NewExternalDNSState(node breeze.Client) client.ExternalDNSState

NewExternalDNSState returns an initialised state

func NewGithubState

func NewGithubState(node breeze.Client) client.GithubState

NewGithubState returns an initialised state client

func NewHelmState

func NewHelmState(node breeze.Client) client.HelmState

NewHelmState returns an initialised helm state

func NewIdentityManager

func NewIdentityManager(node breeze.Client) client.IdentityManagerState

NewIdentityManager returns an initialised state

func NewManagedPolicyState

func NewManagedPolicyState(node breeze.Client) client.ManagedPolicyState

NewManagedPolicyState returns an initialised managed policy state

func NewManifestState

func NewManifestState(node breeze.Client) client.ManifestState

NewManifestState returns an initialised manifest state

func NewMonitoringState

func NewMonitoringState(node breeze.Client) client.MonitoringState

NewMonitoringState returns an initialised state client

func NewParameterState

func NewParameterState(node breeze.Client) client.ParameterState

NewParameterState returns an initialised state

func NewServiceAccountState

func NewServiceAccountState(node breeze.Client) client.ServiceAccountState

NewServiceAccountState returns an initialised state store

func NewUpgradesState

func NewUpgradesState(node breeze.Client) client.UpgradeState

NewUpgradesState returns an initialised state client

func NewVpcState

func NewVpcState(node breeze.Client) client.VPCState

NewVpcState returns an initialised state client

Types

type ArgoCD

type ArgoCD struct {
	Metadata `storm:"inline"`
	Name     string `storm:"unique"`

	ID         ID
	ArgoDomain string
	ArgoURL    string
	AuthDomain string
}

ArgoCD contains state about an argo cd deployment

func NewArgoCD

func NewArgoCD(a *client.ArgoCD, meta Metadata) *ArgoCD

NewArgoCD returns storm compatible state

func (*ArgoCD) Convert

func (a *ArgoCD) Convert() *client.ArgoCD

Convert to client.ArgoCD

type Certificate

type Certificate struct {
	Metadata `storm:"inline"`

	ID                     ID
	FQDN                   string
	Domain                 string `storm:"unique"`
	HostedZoneID           string
	ARN                    string
	StackName              string
	CloudFormationTemplate string
}

Certificate contains storm compatible state

func NewCertificate

func NewCertificate(c *client.Certificate, meta Metadata) *Certificate

NewCertificate constructs a storm compatible Certificate

func (*Certificate) Convert

func (c *Certificate) Convert() *client.Certificate

Convert a Certificate to *client.Certificate

type Cluster

type Cluster struct {
	Metadata `storm:"inline"`

	ID     ID
	Name   string `storm:"unique"`
	Config *v1alpha5.ClusterConfig
}

Cluster contains storm compatible state

func NewCluster

func NewCluster(c *client.Cluster, meta Metadata) *Cluster

NewCluster returns storm compatible state

func (*Cluster) Convert

func (c *Cluster) Convert() *client.Cluster

Convert to client.Cluster

type ClusterVersion

type ClusterVersion struct {
	Metadata `storm:"inline"`

	ID    ID
	Value string
	Key   string
}

ClusterVersion contains state about the cluster version

func (*ClusterVersion) Convert

func (o *ClusterVersion) Convert() *client.ClusterVersion

Convert to client.Upgrade

type ContainerRepository

type ContainerRepository struct {
	Metadata `storm:"inline"`

	ClusterID              ID
	ApplicationName        string
	ImageName              string
	StackName              string `storm:"unique"`
	CloudFormationTemplate string
}

ContainerRepository contains storm compatible state

func NewContainerRepository

func NewContainerRepository(r *client.ContainerRepository, meta Metadata) *ContainerRepository

NewContainerRepository returns storm compatible state

func (*ContainerRepository) Convert

Convert to client.ContainerRepository

type ExternalDNS

type ExternalDNS struct {
	Metadata `storm:"inline"`

	Name string `storm:"unique"`
	Kube *ExternalDNSKube
}

ExternalDNS contains storm compatible state

func NewExternalDNS

func NewExternalDNS(e *client.ExternalDNS, meta Metadata) *ExternalDNS

NewExternalDNS returns storm compatible state

func (*ExternalDNS) Convert

func (e *ExternalDNS) Convert() *client.ExternalDNS

Convert to client.ExternalDNS

type ExternalDNSKube

type ExternalDNSKube struct {
	ID           ID
	HostedZoneID string
	DomainFilter string
	Manifests    map[string]string
}

ExternalDNSKube contains storm compatible state

func NewExternalDNSKube

func NewExternalDNSKube(k *client.ExternalDNSKube) *ExternalDNSKube

NewExternalDNSKube returns storm compatible state

func (*ExternalDNSKube) Convert

func (k *ExternalDNSKube) Convert() *client.ExternalDNSKube

Convert to client.ExternalDNSKube

type GithubDeployKey

type GithubDeployKey struct {
	Organisation     string
	Repository       string
	Identifier       int64
	Title            string
	PublicKey        string
	PrivateKeySecret *GithubSecret
}

GithubDeployKey contains storm compatible state

func NewGithubDeployKey

func NewGithubDeployKey(k *client.GithubDeployKey) *GithubDeployKey

NewGithubDeployKey returns storm compatible state

func (*GithubDeployKey) Convert

func (k *GithubDeployKey) Convert() *client.GithubDeployKey

Convert to client.GithubDeployKey

type GithubRepository

type GithubRepository struct {
	Metadata `storm:"inline"`

	ID           ID
	Organisation string
	Repository   string
	FullName     string `storm:"unique"`
	GitURL       string
	DeployKey    *GithubDeployKey
}

GithubRepository contains storm compatible state

func NewGithubRepository

func NewGithubRepository(r *client.GithubRepository, meta Metadata) *GithubRepository

NewGithubRepository returns storm compatible state

func (*GithubRepository) Convert

Convert to client.GithubRepository

type GithubSecret

type GithubSecret struct {
	Name    string
	Path    string
	Version int64
}

GithubSecret contains storm compatible state

func NewGithubSecret

func NewGithubSecret(s *client.GithubSecret) *GithubSecret

NewGithubSecret returns storm compatible state

func (*GithubSecret) Convert

func (s *GithubSecret) Convert() *client.GithubSecret

Convert to client.GithubSecret

type Helm

type Helm struct {
	Metadata `storm:"inline"`

	ReleaseName string `storm:"unique"`
	ID          ID
	Release     *release.Release
	Chart       *helm.Chart
}

Helm contains storm compatible state

func NewHelm

func NewHelm(h *client.Helm, meta Metadata) *Helm

NewHelm returns storm compatible state

func (*Helm) Convert

func (h *Helm) Convert() *client.Helm

Convert to client.Helm

type HostedZone

type HostedZone struct {
	Metadata `storm:"inline"`

	ID                     ID
	IsDelegated            bool
	Primary                bool
	Managed                bool
	FQDN                   string
	Domain                 string `storm:"unique"`
	HostedZoneID           string
	NameServers            []string
	StackName              string
	CloudFormationTemplate string
}

HostedZone contains storm compatible state

func NewHostedZone

func NewHostedZone(hz *client.HostedZone, meta Metadata) *HostedZone

NewHostedZone constructs a storm compatible HostedZone

func (*HostedZone) Convert

func (hz *HostedZone) Convert() *client.HostedZone

Convert to a client.HostedZone

type ID

type ID struct {
	Region       string
	AWSAccountID string
	ClusterName  string
}

ID contains the same content as an api.ID just modified for use with storm

func NewID

func NewID(id api.ID) ID

NewID returns an ID constructed from an api.ID

func (ID) Convert

func (i ID) Convert() api.ID

Convert to an api.ID

type IdentityPool

type IdentityPool struct {
	Metadata `storm:"inline"`

	ID                      ID
	UserPoolID              string
	AuthDomain              string
	HostedZoneID            string
	StackName               string `storm:"unique"`
	CloudFormationTemplates string
	Certificate             *Certificate
	RecordSetAlias          *RecordSetAlias
}

IdentityPool contains storm compatible state

func NewIdentityPool

func NewIdentityPool(p *client.IdentityPool, meta, certMeta Metadata) *IdentityPool

NewIdentityPool returns a storm compatible IdentityPool

func (*IdentityPool) Convert

func (p *IdentityPool) Convert() *client.IdentityPool

Convert to client.IdentityPool

type IdentityPoolClient

type IdentityPoolClient struct {
	Metadata `storm:"inline"`

	ID                      ID
	UserPoolID              string
	Purpose                 string
	CallbackURL             string
	ClientID                string
	ClientSecret            string
	StackName               string `storm:"unique,index"`
	CloudFormationTemplates string
}

IdentityPoolClient contains storm compatible state

func NewIdentityPoolClient

func NewIdentityPoolClient(c *client.IdentityPoolClient, meta Metadata) *IdentityPoolClient

NewIdentityPoolClient returns a storm compatible IdentityPoolClient

func (*IdentityPoolClient) Convert

Convert to IdentityPoolClient

type IdentityPoolUser

type IdentityPoolUser struct {
	Metadata `storm:"inline"`

	ID                     ID
	Email                  string
	UserPoolID             string
	StackName              string `storm:"unique,index"`
	CloudFormationTemplate string
}

IdentityPoolUser contains storm compatible state

func NewIdentityPoolUser

func NewIdentityPoolUser(u *client.IdentityPoolUser, meta Metadata) *IdentityPoolUser

NewIdentityPoolUser returns a storm compatible IdentityPoolUser

func (*IdentityPoolUser) Convert

Convert to client.IdentityPoolUser

type KubePromStack

type KubePromStack struct {
	Metadata `storm:"inline"`
	Name     string `storm:"unique"`

	ID                                ID
	AuthHostname                      string
	CertificateARN                    string
	ClientID                          string
	FargateCloudWatchPolicyARN        string
	FargateProfilePodExecutionRoleARN string
	Hostname                          string
	SecretsAdminPassKey               string
	SecretsAdminUserKey               string
	SecretsClientSecretKey            string
	SecretsConfigName                 string
	SecretsCookieSecretKey            string
}

KubePromStack contains storm compatible state

func NewKubePromStack

func NewKubePromStack(s *client.KubePromStack, meta Metadata) *KubePromStack

NewKubePromStack returns storm compatible state

func (*KubePromStack) Convert

func (s *KubePromStack) Convert() *client.KubePromStack

Convert to client.KubePromStack

type KubernetesManifest

type KubernetesManifest struct {
	Metadata `storm:"inline"`

	ID        ID
	Name      string `storm:"unique"`
	Namespace string
	Type      string
	Content   string
}

KubernetesManifest contains storm compatible state

func NewKubernetesManifest

func NewKubernetesManifest(m *client.KubernetesManifest, meta Metadata) *KubernetesManifest

NewKubernetesManifest constructs a storm compatible KubernetesManifest

func (*KubernetesManifest) Convert

Convert to a client.KubernetesManifest

type ManagedPolicy

type ManagedPolicy struct {
	Metadata `storm:"inline"`

	ID                     ID
	StackName              string `storm:"unique"`
	PolicyARN              string
	CloudFormationTemplate string
}

ManagedPolicy contains storm compatible state

func NewManagedPolicy

func NewManagedPolicy(p *client.ManagedPolicy, meta Metadata) *ManagedPolicy

NewManagedPolicy returns a storm compatible ManagedPolicy

func (*ManagedPolicy) Convert

func (p *ManagedPolicy) Convert() *client.ManagedPolicy

Convert to a client.ManagedPolicy

type Metadata

type Metadata struct {
	Identifier int `storm:"id,increment"`
	CreatedAt  time.Time
	UpdatedAt  time.Time `storm:"index"`
	Deleted    bool
}

Metadata contains some useful metadata about a struct stored in storm

func NewMetadata

func NewMetadata() Metadata

NewMetadata returns initialised metadata state

type OriginalClusterVersion

type OriginalClusterVersion struct {
	Metadata `storm:"inline"`

	ID    ID
	Value string
	Key   string
}

OriginalClusterVersion contains state about the first cluster version installed

func (*OriginalClusterVersion) Convert

Convert to client.Upgrade

type PostgresDatabase

type PostgresDatabase struct {
	Metadata `storm:"inline"`

	ID                           ID
	ApplicationName              string
	UserName                     string
	StackName                    string `storm:"unique"`
	AdminSecretFriendlyName      string
	EndpointAddress              string
	EndpointPort                 int
	OutgoingSecurityGroupID      string
	SecretsManagerAdminSecretARN string
	LambdaPolicyARN              string
	LambdaRoleARN                string
	LambdaFunctionARN            string
	CloudFormationTemplate       string
	Namespace                    string
	AdminSecretName              string
	AdminSecretARN               string
	DatabaseConfigMapName        string
	RotaterBucket                *S3Bucket
}

PostgresDatabase contains storm compatible state

func NewPostgresDatabase

func NewPostgresDatabase(d *client.PostgresDatabase, meta Metadata) *PostgresDatabase

NewPostgresDatabase returns storm compatible state

func (*PostgresDatabase) Convert

Convert to client.PostgresDatabase

type RecordSetAlias

type RecordSetAlias struct {
	AliasDomain            string
	AliasHostedZones       string
	StackName              string
	CloudFormationTemplate string
}

RecordSetAlias contains storm compatible state

func NewRecordSetAlias

func NewRecordSetAlias(a *client.RecordSetAlias) *RecordSetAlias

NewRecordSetAlias returns a storm compatible RecordSetAlias

func (*RecordSetAlias) Convert

func (a *RecordSetAlias) Convert() *client.RecordSetAlias

Convert to client.RecordSetAlias

type S3Bucket

type S3Bucket struct {
	Name                   string
	StackName              string
	CloudFormationTemplate string
}

S3Bucket contains storm compatible state

func NewS3Bucket

func NewS3Bucket(b *client.S3Bucket) *S3Bucket

NewS3Bucket returns storm compatible state

func (*S3Bucket) Convert

func (b *S3Bucket) Convert() *client.S3Bucket

Convert to client.S3Bucket

type SecretParameter

type SecretParameter struct {
	Metadata `storm:"inline"`

	ID      ID
	Name    string `storm:"unique"`
	Path    string
	Version int64
}

SecretParameter contains storm compatible state

func NewSecretParameter

func NewSecretParameter(p *client.SecretParameter, meta Metadata) *SecretParameter

NewSecretParameter returns a storm compatible SecretParameter

func (*SecretParameter) Convert

func (p *SecretParameter) Convert() *client.SecretParameter

Convert to a client.SecretParameter

type ServiceAccount

type ServiceAccount struct {
	Metadata `storm:"inline"`

	ID        ID
	Name      string `storm:"unique"`
	PolicyArn string
	Config    *v1alpha5.ClusterConfig
}

ServiceAccount contains storm compatible state

func NewServiceAccount

func NewServiceAccount(sa *client.ServiceAccount, meta Metadata) *ServiceAccount

NewServiceAccount constructs a storm compatible ServiceAccount

func (*ServiceAccount) Convert

func (sa *ServiceAccount) Convert() *client.ServiceAccount

Convert to a client.ServiceAccount

type Upgrade

type Upgrade struct {
	Metadata `storm:"inline"`

	ID      ID
	Version string
}

Upgrade contains state about an upgrade

func (*Upgrade) Convert

func (u *Upgrade) Convert() *client.Upgrade

Convert to client.Upgrade

type Upgrades

type Upgrades struct {
	Metadata `storm:"inline"`

	ID ID
}

Upgrades contains state about upgrades

type Vpc

type Vpc struct {
	Metadata `storm:"inline"`

	ID                       ID
	StackName                string `storm:"unique"`
	CloudFormationTemplate   string
	VpcID                    string
	Cidr                     string
	PublicSubnets            []VpcSubnet
	PrivateSubnets           []VpcSubnet
	DatabaseSubnets          []VpcSubnet
	DatabaseSubnetsGroupName string
}

Vpc contains storm compatible state

func NewVpc

func NewVpc(v *client.Vpc, meta Metadata) *Vpc

NewVpc returns storm compatible state

func (*Vpc) Convert

func (v *Vpc) Convert() *client.Vpc

Convert to client.Vpc

type VpcSubnet

type VpcSubnet struct {
	ID               string
	Cidr             string
	AvailabilityZone string
}

VpcSubnet represents an aws vpc subnet

func NewVpcSubnet

func NewVpcSubnet(s client.VpcSubnet) VpcSubnet

NewVpcSubnet returns storm compatible state

func (*VpcSubnet) Convert

func (s *VpcSubnet) Convert() client.VpcSubnet

Convert to client.VpcSubnet

Source Files

argocd_state.go certificate_state.go cluster_state.go component_state.go container_repository_state.go doc.go domain_state.go externaldns_state.go github_state.go helm_state.go identitymanager_state.go managedpolicy_state.go manifest_state.go monitoring_state.go parameter_state.go serviceaccount_state.go storm.go upgrade_state.go vpc_state.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
11 packages
Last checked
4 days ago

Tools for package owners.