capi

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: UPL-1.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// env var names
	CAPINodeSSHKey               = "OCI_SSH_KEY"
	OCICredsKey                  = "OCI_CREDENTIALS_KEY"
	OCIPrivateCredsKeyBase64     = "OCI_CREDENTIALS_KEY_B64"
	OCITenancyIDKeyBase64        = "OCI_TENANCY_ID_B64"
	OCICredsFingerprintKeyBase64 = "OCI_CREDENTIALS_FINGERPRINT_B64"
	OCIUserIDKeyBase64           = "OCI_USER_ID_B64"
	OCIRegionKeyBase64           = "OCI_REGION_B64"
	OCIImageIDKey                = "OCI_IMAGE_ID"
	OCIVCNKey                    = "OCI_VCN_ID"
	OCISubnetKey                 = "OCI_SUBNET_ID"
)

Variables

View Source
var (
	OCIUserID              string
	OCIFingerprint         string
	OCITenancyID           string
	OCIRegion              string
	OCICompartmentID       string
	OCIVcnID               string
	OCISubnetID            string
	OCISSHKeyPath          string
	OCIPrivateKeyPath      string
	ClusterName            string
	OCNENamespace          string
	OracleLinuxDisplayName string
	OperatingSystem        string
	OperatingSystemVersion string
	ImagePullSecret        string
	DockerRepo             string
	DockerCredsUser        string
	DockerCredsPassword    string
	ImageName              string
	ImageTag               string
	OCNEK8sVersion         string
	OCNEControlPlaneName   string
)

Functions

func GetOCIConfigurationProvider

func GetOCIConfigurationProvider(log *zap.SugaredLogger) common.ConfigurationProvider

func SubnetAccess

func SubnetAccess(subnet core.Subnet, log *zap.SugaredLogger) string

SubnetAccess returns public or private, depending on a subnet's access type

Types

type CAPITestImpl

type CAPITestImpl struct{}

func (CAPITestImpl) CheckOCNEControlPlaneStatus

func (c CAPITestImpl) CheckOCNEControlPlaneStatus(clusterName, expectedStatusType, expectedStatus, expectedReason string, log *zap.SugaredLogger) bool

func (CAPITestImpl) ClusterTemplateGenerate

func (c CAPITestImpl) ClusterTemplateGenerate(clusterName, templatePath string, log *zap.SugaredLogger) (string, error)

ClusterTemplateGenerate used for cluster template generation

func (CAPITestImpl) CreateImagePullSecrets

func (c CAPITestImpl) CreateImagePullSecrets(clusterName string, log *zap.SugaredLogger) error

func (CAPITestImpl) CreateNamespace

func (c CAPITestImpl) CreateNamespace(namespace string, log *zap.SugaredLogger) error

func (CAPITestImpl) DebugSVCOutput

func (c CAPITestImpl) DebugSVCOutput(clusterName string, log *zap.SugaredLogger) error

func (CAPITestImpl) DeployAnyClusterResourceSets

func (c CAPITestImpl) DeployAnyClusterResourceSets(clusterName, templateName string, log *zap.SugaredLogger) error

DeployAnyClusterResourceSets deploys the VZ ClusterResourceSets by deploying the addon template YAML

func (CAPITestImpl) DeployClusterInfraClusterResourceSets

func (c CAPITestImpl) DeployClusterInfraClusterResourceSets(clusterName, templateName string, log *zap.SugaredLogger) error

DeployClusterInfraClusterResourceSets deploys the ClusterResourceSets by deploying the addon template YAML ClusterResourceSets are used to deploy the following on OCNE workload clusters 1. CCM Secrets 2. Calico Module 3. CCM Module

func (CAPITestImpl) DisplayWorkloadClusterResources

func (c CAPITestImpl) DisplayWorkloadClusterResources(clusterName string, log *zap.SugaredLogger) error

DisplayWorkloadClusterResources displays the pods of workload OCNE cluster as a formatted table.

func (CAPITestImpl) EnsureMachinesAreProvisioned

func (c CAPITestImpl) EnsureMachinesAreProvisioned(namespace, clusterName string, log *zap.SugaredLogger) error

EnsureMachinesAreProvisioned fetches the machines that are deployed during OCNE cluster creation.

func (CAPITestImpl) EnsureVerrazzano

func (c CAPITestImpl) EnsureVerrazzano(clusterName string, log *zap.SugaredLogger) error

func (CAPITestImpl) GetCapiClusterDynamicClient

func (c CAPITestImpl) GetCapiClusterDynamicClient(clusterName string, log *zap.SugaredLogger) (dynamic.Interface, error)

func (CAPITestImpl) GetCapiClusterK8sClient

func (c CAPITestImpl) GetCapiClusterK8sClient(clusterName string, log *zap.SugaredLogger) (client *kubernetes.Clientset, err error)

GetCapiClusterK8sClient returns the K8s client of an OCNE cluster if it exists.

func (CAPITestImpl) GetCapiClusterKubeConfig

func (c CAPITestImpl) GetCapiClusterKubeConfig(clusterName string, log *zap.SugaredLogger) ([]byte, error)

GetCapiClusterKubeConfig returns the content of the kubeconfig file of an OCNE cluster if it exists.

func (CAPITestImpl) GetCluster

func (c CAPITestImpl) GetCluster(namespace, clusterName string, log *zap.SugaredLogger) (*Cluster, error)

GetCluster is used to fetch capi cluster info given a cluster name and namespace, if it exists

func (CAPITestImpl) GetOCNEControlPlane

func (c CAPITestImpl) GetOCNEControlPlane(namespace string, log *zap.SugaredLogger) (*OCNEControlPlane, error)

GetOCNEControlPlane is used to fetch OCNE control plane info given a control plane name and namespace, if it exists

func (CAPITestImpl) GetUnstructuredData

func (c CAPITestImpl) GetUnstructuredData(group, version, resource, resourceName, nameSpaceName string, log *zap.SugaredLogger) (*unstructured.Unstructured, error)

GetUnstructuredData common utility to fetch unstructured data

func (CAPITestImpl) GetUnstructuredDataList

func (c CAPITestImpl) GetUnstructuredDataList(group, version, resource, nameSpaceName string, log *zap.SugaredLogger) (*unstructured.UnstructuredList, error)

GetUnstructuredData common utility to fetch list of unstructured data

func (CAPITestImpl) GetVerrazzano

func (c CAPITestImpl) GetVerrazzano(clusterName, namespace, vzinstallname string, log *zap.SugaredLogger) (*unstructured.Unstructured, error)

func (CAPITestImpl) MonitorCapiClusterCreation

func (c CAPITestImpl) MonitorCapiClusterCreation(clusterName string, log *zap.SugaredLogger) error

MonitorCapiClusterCreation fetches the workload OCNE cluster elements and prints them as a formatted table. Returns an error if Cluster is not Ready

func (CAPITestImpl) MonitorCapiClusterDeletion

func (c CAPITestImpl) MonitorCapiClusterDeletion(clusterName string, log *zap.SugaredLogger) error

func (CAPITestImpl) PrintYamlOutput

func (c CAPITestImpl) PrintYamlOutput(printer clusterapi.YamlPrinter, outputFile string) error

PrintYamlOutput is used to print yaml templates to stdout or a file

func (CAPITestImpl) ProcessOCIPrivateKeysBase64

func (c CAPITestImpl) ProcessOCIPrivateKeysBase64(file, key string, log *zap.SugaredLogger) error

func (CAPITestImpl) ProcessOCIPrivateKeysSingleLine

func (c CAPITestImpl) ProcessOCIPrivateKeysSingleLine(file, key string, log *zap.SugaredLogger) error

func (CAPITestImpl) ProcessOCISSHKeys

func (c CAPITestImpl) ProcessOCISSHKeys(file, key string, log *zap.SugaredLogger) error

func (CAPITestImpl) SetImageID

func (c CAPITestImpl) SetImageID(key string, log *zap.SugaredLogger) error

func (CAPITestImpl) ShowEvents added in v1.6.5

func (c CAPITestImpl) ShowEvents(namespace string, log *zap.SugaredLogger) error

ShowEvents displays the events from a specific namespace

func (CAPITestImpl) ShowNodeInfo

func (c CAPITestImpl) ShowNodeInfo(client *kubernetes.Clientset, clustername string, log *zap.SugaredLogger) error

ShowNodeInfo displays the nodes of workload OCNE cluster as a formatted table.

func (CAPITestImpl) ShowPodInfo

func (c CAPITestImpl) ShowPodInfo(client *kubernetes.Clientset, clusterName string, log *zap.SugaredLogger) error

ShowPodInfo displays the pods of workload OCNE cluster as a formatted table.

func (CAPITestImpl) ToggleModules added in v1.6.5

func (c CAPITestImpl) ToggleModules(group, version, resource, clusterName, nameSpaceName string, toggle bool, log *zap.SugaredLogger) error

ToggleModules toggles module operator or VPO

func (CAPITestImpl) TriggerCapiClusterCreation

func (c CAPITestImpl) TriggerCapiClusterCreation(clusterName, templateName string, log *zap.SugaredLogger) error

TriggerCapiClusterCreation starts the OCNE workload cluster creation by applying the template YAML

func (CAPITestImpl) TriggerCapiClusterDeletion

func (c CAPITestImpl) TriggerCapiClusterDeletion(clusterName, nameSpaceName string, log *zap.SugaredLogger) error

func (CAPITestImpl) UpdateOCINSG

func (c CAPITestImpl) UpdateOCINSG(clusterName, nsgDisplayNameToUpdate, nsgDisplayNameInRule, info string, rule *SecurityRuleDetails, log *zap.SugaredLogger) error

UpdateOCINSG allows updating nsg based on source subnet cidr using the source subnet name

func (CAPITestImpl) UpdateOCINSGEW

func (c CAPITestImpl) UpdateOCINSGEW(clusterName, nsgDisplayNameToUpdate, info string, rule *SecurityRuleDetails, log *zap.SugaredLogger) error

UpdateOCINSGEW allows updating nsg based on vcn cidr

type CapiTestClient

type CapiTestClient interface {
	PrintYamlOutput(printer clusterapi.YamlPrinter, outputFile string) error
	ClusterTemplateGenerate(clusterName, templatePath string, log *zap.SugaredLogger) (string, error)
	GetUnstructuredData(group, version, resource, resourceName, nameSpaceName string, log *zap.SugaredLogger) (*unstructured.Unstructured, error)
	GetCluster(namespace, clusterName string, log *zap.SugaredLogger) (*Cluster, error)
	GetOCNEControlPlane(namespace string, log *zap.SugaredLogger) (*OCNEControlPlane, error)
	CheckOCNEControlPlaneStatus(clusterName, expectedStatusType, expectedStatus, expectedReason string, log *zap.SugaredLogger) bool
	GetCapiClusterKubeConfig(clusterName string, log *zap.SugaredLogger) ([]byte, error)
	GetCapiClusterK8sClient(clusterName string, log *zap.SugaredLogger) (client *kubernetes.Clientset, err error)
	TriggerCapiClusterCreation(clusterName, templateName string, log *zap.SugaredLogger) error
	DeployClusterInfraClusterResourceSets(clusterName, templateName string, log *zap.SugaredLogger) error
	DeployAnyClusterResourceSets(clusterName, templateName string, log *zap.SugaredLogger) error
	EnsureMachinesAreProvisioned(namespace, clusterName string, log *zap.SugaredLogger) error
	MonitorCapiClusterDeletion(clusterName string, log *zap.SugaredLogger) error
	MonitorCapiClusterCreation(clusterName string, log *zap.SugaredLogger) error
	TriggerCapiClusterDeletion(clusterName, nameSpaceName string, log *zap.SugaredLogger) error
	ShowNodeInfo(client *kubernetes.Clientset, clustername string, log *zap.SugaredLogger) error
	ShowPodInfo(client *kubernetes.Clientset, clusterName string, log *zap.SugaredLogger) error
	ShowEvents(namespace string, log *zap.SugaredLogger) error
	DisplayWorkloadClusterResources(clusterName string, log *zap.SugaredLogger) error
	UpdateOCINSG(clusterName, nsgDisplayNameToUpdate, nsgDisplayNameInRule, info string, rule *SecurityRuleDetails, log *zap.SugaredLogger) error
	UpdateOCINSGEW(clusterName, nsgDisplayNameToUpdate, info string, rule *SecurityRuleDetails, log *zap.SugaredLogger) error
	CreateImagePullSecrets(clusterName string, log *zap.SugaredLogger) error
	ProcessOCIPrivateKeysBase64(file, key string, log *zap.SugaredLogger) error
	ProcessOCISSHKeys(file, key string, log *zap.SugaredLogger) error
	ProcessOCIPrivateKeysSingleLine(file, key string, log *zap.SugaredLogger) error
	CreateNamespace(namespace string, log *zap.SugaredLogger) error
	SetImageID(key string, log *zap.SugaredLogger) error
	GetCapiClusterDynamicClient(clusterName string, log *zap.SugaredLogger) (dynamic.Interface, error)
	GetVerrazzano(clusterName, namespace, vzinstallname string, log *zap.SugaredLogger) (*unstructured.Unstructured, error)
	EnsureVerrazzano(clusterName string, log *zap.SugaredLogger) error
	DebugSVCOutput(clusterName string, log *zap.SugaredLogger) error
	ToggleModules(group, version, resource, clusterName, nameSpaceName string, toggle bool, log *zap.SugaredLogger) error
}

func NewCapiTestClient

func NewCapiTestClient() CapiTestClient

NewCapiTestClient creates a new CAPI Test Client

type ClientImpl

type ClientImpl struct {
	// contains filtered or unexported fields
}

ClientImpl OCI Client implementation

func (*ClientImpl) GetImageIDByName

func (c *ClientImpl) GetImageIDByName(ctx context.Context, compartmentID, displayName, operatingSystem, operatingSystemVersion, shape string, log *zap.SugaredLogger) (string, error)

GetImageIDByName retrieves an image OCID given an image name and a compartment id, if that image exists.

func (*ClientImpl) GetNsgIDByName

func (c *ClientImpl) GetNsgIDByName(ctx context.Context, compartmentID, vcnID, displayName string, log *zap.SugaredLogger) (string, error)

GetNsgIDByName retrieves an NSG OCID given a nsg name and a compartment id, if the nsg exists.

func (*ClientImpl) GetSubnetByID

func (c *ClientImpl) GetSubnetByID(ctx context.Context, subnetID string, log *zap.SugaredLogger) (*core.Subnet, error)

GetSubnetByID retrieves a subnet given that subnet's Id.

func (*ClientImpl) GetSubnetCIDRByName

func (c *ClientImpl) GetSubnetCIDRByName(ctx context.Context, compartmentID, vcnID, displayName string, log *zap.SugaredLogger) (string, error)

GetSubnetCIDRByName retrieves an Subnet CIDR block given a subnet name and a compartment id, if the subnet exists.

func (*ClientImpl) GetSubnetIDByName

func (c *ClientImpl) GetSubnetIDByName(ctx context.Context, compartmentID, vcnID, displayName string, log *zap.SugaredLogger) (string, error)

GetSubnetIDByName retrieves an Subnet OCID given a subnet name and a compartment id, if the subnet exists.

func (*ClientImpl) GetVcnCIDRByName

func (c *ClientImpl) GetVcnCIDRByName(ctx context.Context, compartmentID, displayName string, log *zap.SugaredLogger) (string, error)

GetVcnCIDRByName retrieves an VCN CIDR given a vcn name and a compartment id, if the vcn exists.

func (*ClientImpl) GetVcnIDByName

func (c *ClientImpl) GetVcnIDByName(ctx context.Context, compartmentID, displayName string, log *zap.SugaredLogger) (string, error)

GetVcnIDByName retrieves an VCN OCID given a vcn name and a compartment id, if the vcn exists.

func (*ClientImpl) UpdateNSG

func (c *ClientImpl) UpdateNSG(ctx context.Context, nsgID string, rule *SecurityRuleDetails, log *zap.SugaredLogger) error

UpdateNSG retrieves an NSG OCID given a nsg name and a compartment id, if the nsg exists.

type Cluster

type Cluster struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Metadata   struct {
		CreationTimestamp time.Time `json:"creationTimestamp"`
		Finalizers        []string  `json:"finalizers"`
		Generation        int       `json:"generation"`
		Labels            struct {
			ClusterXK8SIoClusterName string `json:"cluster.x-k8s.io/cluster-name"`
		} `json:"labels"`
		Name            string `json:"name"`
		Namespace       string `json:"namespace"`
		ResourceVersion string `json:"resourceVersion"`
		UID             string `json:"uid"`
	} `json:"metadata"`
	Spec struct {
		ClusterNetwork struct {
			Pods struct {
				CidrBlocks []string `json:"cidrBlocks"`
			} `json:"pods"`
			ServiceDomain string `json:"serviceDomain"`
			Services      struct {
				CidrBlocks []string `json:"cidrBlocks"`
			} `json:"services"`
		} `json:"clusterNetwork"`
		ControlPlaneEndpoint struct {
			Host string `json:"host"`
			Port int    `json:"port"`
		} `json:"controlPlaneEndpoint"`
		ControlPlaneRef struct {
			APIVersion string `json:"apiVersion"`
			Kind       string `json:"kind"`
			Name       string `json:"name"`
			Namespace  string `json:"namespace"`
		} `json:"controlPlaneRef"`
		InfrastructureRef struct {
			APIVersion string `json:"apiVersion"`
			Kind       string `json:"kind"`
			Name       string `json:"name"`
			Namespace  string `json:"namespace"`
		} `json:"infrastructureRef"`
		Topology struct {
			Class        string `json:"class"`
			ControlPlane struct {
				Metadata struct {
				} `json:"metadata"`
				Replicas int `json:"replicas"`
			} `json:"controlPlane"`
			Variables []struct {
				Name  string      `json:"name"`
				Value interface{} `json:"value"`
			} `json:"variables"`
			Version string `json:"version"`
			Workers struct {
				MachineDeployments []struct {
					Class    string `json:"class"`
					Metadata struct {
					} `json:"metadata"`
					Name     string `json:"name"`
					Replicas int    `json:"replicas"`
				} `json:"machineDeployments"`
			} `json:"workers"`
		} `json:"topology"`
	} `json:"spec"`
	Status struct {
		Conditions []struct {
			LastTransitionTime time.Time `json:"lastTransitionTime"`
			Status             string    `json:"status"`
			Type               string    `json:"type"`
		} `json:"conditions"`
		ControlPlaneReady bool `json:"controlPlaneReady"`
		FailureDomains    struct {
			Field1 struct {
				Attributes struct {
					AvailabilityDomain string `json:"AvailabilityDomain"`
				} `json:"attributes"`
				ControlPlane bool `json:"controlPlane"`
			} `json:"1"`
			Field2 struct {
				Attributes struct {
					AvailabilityDomain string `json:"AvailabilityDomain"`
				} `json:"attributes"`
				ControlPlane bool `json:"controlPlane"`
			} `json:"2"`
			Field3 struct {
				Attributes struct {
					AvailabilityDomain string `json:"AvailabilityDomain"`
				} `json:"attributes"`
				ControlPlane bool `json:"controlPlane"`
			} `json:"3"`
		} `json:"failureDomains"`
		InfrastructureReady bool   `json:"infrastructureReady"`
		ObservedGeneration  int    `json:"observedGeneration"`
		Phase               string `json:"phase"`
	} `json:"status"`
}

type Machine

type Machine struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Metadata   struct {
		Annotations struct {
			ControlplaneClusterXK8SIoOcneClusterConfiguration string `json:"controlplane.cluster.x-k8s.io/ocne-cluster-configuration"`
		} `json:"annotations"`
		CreationTimestamp time.Time `json:"creationTimestamp"`
		Finalizers        []string  `json:"finalizers"`
		Generation        int       `json:"generation"`
		Labels            struct {
			ClusterXK8SIoClusterName      string `json:"cluster.x-k8s.io/cluster-name"`
			ClusterXK8SIoControlPlane     string `json:"cluster.x-k8s.io/control-plane"`
			ClusterXK8SIoControlPlaneName string `json:"cluster.x-k8s.io/control-plane-name"`
		} `json:"labels"`
		Name            string `json:"name"`
		Namespace       string `json:"namespace"`
		OwnerReferences []struct {
			APIVersion         string `json:"apiVersion"`
			BlockOwnerDeletion bool   `json:"blockOwnerDeletion"`
			Controller         bool   `json:"controller"`
			Kind               string `json:"kind"`
			Name               string `json:"name"`
			UID                string `json:"uid"`
		} `json:"ownerReferences"`
		ResourceVersion string `json:"resourceVersion"`
		UID             string `json:"uid"`
	} `json:"metadata"`
	Spec struct {
		Bootstrap struct {
			ConfigRef struct {
				APIVersion string `json:"apiVersion"`
				Kind       string `json:"kind"`
				Name       string `json:"name"`
				Namespace  string `json:"namespace"`
				UID        string `json:"uid"`
			} `json:"configRef"`
			DataSecretName string `json:"dataSecretName"`
		} `json:"bootstrap"`
		ClusterName       string `json:"clusterName"`
		FailureDomain     string `json:"failureDomain"`
		InfrastructureRef struct {
			APIVersion string `json:"apiVersion"`
			Kind       string `json:"kind"`
			Name       string `json:"name"`
			Namespace  string `json:"namespace"`
			UID        string `json:"uid"`
		} `json:"infrastructureRef"`
		NodeDeletionTimeout string `json:"nodeDeletionTimeout"`
		ProviderID          string `json:"providerID"`
		Version             string `json:"version"`
	} `json:"spec"`
	Status struct {
		Addresses []struct {
			Address string `json:"address"`
			Type    string `json:"type"`
		} `json:"addresses"`
		BootstrapReady         bool      `json:"bootstrapReady"`
		CertificatesExpiryDate time.Time `json:"certificatesExpiryDate"`
		Conditions             []struct {
			LastTransitionTime time.Time `json:"lastTransitionTime"`
			Status             string    `json:"status"`
			Type               string    `json:"type"`
		} `json:"conditions"`
		InfrastructureReady bool      `json:"infrastructureReady"`
		LastUpdated         time.Time `json:"lastUpdated"`
		NodeInfo            struct {
			Architecture            string `json:"architecture"`
			BootID                  string `json:"bootID"`
			ContainerRuntimeVersion string `json:"containerRuntimeVersion"`
			KernelVersion           string `json:"kernelVersion"`
			KubeProxyVersion        string `json:"kubeProxyVersion"`
			KubeletVersion          string `json:"kubeletVersion"`
			MachineID               string `json:"machineID"`
			OperatingSystem         string `json:"operatingSystem"`
			OsImage                 string `json:"osImage"`
			SystemUUID              string `json:"systemUUID"`
		} `json:"nodeInfo"`
		NodeRef struct {
			APIVersion string `json:"apiVersion"`
			Kind       string `json:"kind"`
			Name       string `json:"name"`
			UID        string `json:"uid"`
		} `json:"nodeRef"`
		ObservedGeneration int    `json:"observedGeneration"`
		Phase              string `json:"phase"`
	} `json:"status"`
}

type OCIClient

type OCIClient interface {
	GetSubnetByID(ctx context.Context, subnetID string, log *zap.SugaredLogger) (*core.Subnet, error)
	GetImageIDByName(ctx context.Context, compartmentID, displayName, operatingSystem, operatingSystemVersion, shape string, log *zap.SugaredLogger) (string, error)
	GetVcnIDByName(ctx context.Context, compartmentID, displayName string, log *zap.SugaredLogger) (string, error)
	GetVcnCIDRByName(ctx context.Context, compartmentID, displayName string, log *zap.SugaredLogger) (string, error)
	GetSubnetIDByName(ctx context.Context, compartmentID, vcnID, displayName string, log *zap.SugaredLogger) (string, error)
	GetSubnetCIDRByName(ctx context.Context, compartmentID, vcnID, displayName string, log *zap.SugaredLogger) (string, error)
	GetNsgIDByName(ctx context.Context, compartmentID, vcnID, displayName string, log *zap.SugaredLogger) (string, error)
	UpdateNSG(ctx context.Context, nsgID string, rule *SecurityRuleDetails, log *zap.SugaredLogger) error
}

Client interface for OCI Clients

func NewClient

func NewClient(provider common.ConfigurationProvider) (OCIClient, error)

NewClient creates a new OCI Client

type OCNEControlPlane

type OCNEControlPlane struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Metadata   struct {
		CreationTimestamp time.Time `json:"creationTimestamp"`
		Finalizers        []string  `json:"finalizers"`
		Generation        int       `json:"generation"`
		Labels            struct {
			ClusterXK8SIoClusterName string `json:"cluster.x-k8s.io/cluster-name"`
		} `json:"labels"`
		Name            string `json:"name"`
		Namespace       string `json:"namespace"`
		OwnerReferences []struct {
			APIVersion         string `json:"apiVersion"`
			BlockOwnerDeletion bool   `json:"blockOwnerDeletion"`
			Controller         bool   `json:"controller"`
			Kind               string `json:"kind"`
			Name               string `json:"name"`
			UID                string `json:"uid"`
		} `json:"ownerReferences"`
		ResourceVersion string `json:"resourceVersion"`
		UID             string `json:"uid"`
	} `json:"metadata"`
	Spec struct {
		ControlPlaneConfig struct {
			ClusterConfiguration struct {
				APIServer struct {
					CertSANs []string `json:"certSANs"`
				} `json:"apiServer"`
				ControllerManager struct {
				} `json:"controllerManager"`
				DNS struct {
					ImageRepository string `json:"imageRepository"`
					ImageTag        string `json:"imageTag"`
				} `json:"dns"`
				Etcd struct {
					Local struct {
						ImageRepository string `json:"imageRepository"`
						ImageTag        string `json:"imageTag"`
					} `json:"local"`
				} `json:"etcd"`
				ImageRepository string `json:"imageRepository"`
				Networking      struct {
				} `json:"networking"`
				Scheduler struct {
				} `json:"scheduler"`
			} `json:"clusterConfiguration"`
			Format             string `json:"format"`
			ImageConfiguration struct {
				Proxy struct {
					HTTPProxy  string `json:"httpProxy"`
					HTTPSProxy string `json:"httpsProxy"`
					NoProxy    string `json:"noProxy"`
				} `json:"proxy"`
			} `json:"imageConfiguration"`
			InitConfiguration struct {
				LocalAPIEndpoint struct {
				} `json:"localAPIEndpoint"`
				NodeRegistration struct {
					CriSocket        string `json:"criSocket"`
					KubeletExtraArgs struct {
						CloudProvider string `json:"cloud-provider"`
						ProviderID    string `json:"provider-id"`
					} `json:"kubeletExtraArgs"`
				} `json:"nodeRegistration"`
			} `json:"initConfiguration"`
			JoinConfiguration struct {
				Discovery struct {
				} `json:"discovery"`
				NodeRegistration struct {
					CriSocket        string `json:"criSocket"`
					KubeletExtraArgs struct {
						CloudProvider string `json:"cloud-provider"`
						ProviderID    string `json:"provider-id"`
					} `json:"kubeletExtraArgs"`
				} `json:"nodeRegistration"`
			} `json:"joinConfiguration"`
		} `json:"controlPlaneConfig"`
		MachineTemplate struct {
			InfrastructureRef struct {
				APIVersion string `json:"apiVersion"`
				Kind       string `json:"kind"`
				Name       string `json:"name"`
				Namespace  string `json:"namespace"`
			} `json:"infrastructureRef"`
			Metadata struct {
			} `json:"metadata"`
		} `json:"machineTemplate"`
		ModuleOperator struct {
			Enabled bool `json:"enabled"`
		} `json:"moduleOperator"`
		VerrazzanoPlatformOperator struct {
			Enabled bool `json:"enabled"`
		} `json:"verrazzanoPlatformOperator"`
		Replicas        int `json:"replicas"`
		RolloutStrategy struct {
			RollingUpdate struct {
				MaxSurge int `json:"maxSurge"`
			} `json:"rollingUpdate"`
			Type string `json:"type"`
		} `json:"rolloutStrategy"`
		Version string `json:"version"`
	} `json:"spec"`
	Status struct {
		Conditions []struct {
			LastTransitionTime time.Time `json:"lastTransitionTime"`
			Status             string    `json:"status"`
			Type               string    `json:"type"`
			Reason             string    `json:"reason"`
			Severity           string    `json:"severity"`
		} `json:"conditions"`
		Initialized         bool   `json:"initialized"`
		ObservedGeneration  int    `json:"observedGeneration"`
		Ready               bool   `json:"ready"`
		ReadyReplicas       int    `json:"readyReplicas"`
		Replicas            int    `json:"replicas"`
		Selector            string `json:"selector"`
		UnavailableReplicas int    `json:"unavailableReplicas"`
		UpdatedReplicas     int    `json:"updatedReplicas"`
		Version             string `json:"version"`
	} `json:"status"`
}

type SecurityRuleDetails

type SecurityRuleDetails struct {
	Protocol    string
	Description string
	Source      string
	IsStateless bool
	TCPPortMax  int
	TCPPortMin  int
}

type Verrazzano

type Verrazzano struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Metadata   struct {
		Annotations struct {
			KubectlKubernetesIoLastAppliedConfiguration string `json:"kubectl.kubernetes.io/last-applied-configuration"`
		} `json:"annotations"`
		CreationTimestamp time.Time `json:"creationTimestamp"`
		Finalizers        []string  `json:"finalizers"`
		Generation        int       `json:"generation"`
		Name              string    `json:"name"`
		Namespace         string    `json:"namespace"`
		ResourceVersion   string    `json:"resourceVersion"`
		UID               string    `json:"uid"`
	} `json:"metadata"`
	Spec struct {
		Components struct {
		} `json:"components"`
		EnvironmentName string `json:"environmentName"`
		Profile         string `json:"profile"`
		Security        struct {
		} `json:"security"`
	} `json:"spec"`
	Status struct {
		Available  string `json:"available"`
		Conditions []struct {
			LastTransitionTime time.Time `json:"lastTransitionTime"`
			Message            string    `json:"message"`
			Status             string    `json:"status"`
			Type               string    `json:"type"`
		} `json:"conditions"`
		Instance struct {
			ConsoleURL              string `json:"consoleUrl"`
			GrafanaURL              string `json:"grafanaUrl"`
			KeyCloakURL             string `json:"keyCloakUrl"`
			KialiURL                string `json:"kialiUrl"`
			OpenSearchDashboardsURL string `json:"openSearchDashboardsUrl"`
			OpenSearchURL           string `json:"openSearchUrl"`
			PrometheusURL           string `json:"prometheusUrl"`
			RancherURL              string `json:"rancherUrl"`
		} `json:"instance"`
		State   string `json:"state"`
		Version string `json:"version"`
	} `json:"status"`
}

Jump to

Keyboard shortcuts

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