Class KubeSetup
Implements cluster setup operations.
Namespace: Neon.Kube.Setup
Assembly: Neon.Kube.Setup.dll
Syntax
public static class KubeSetup
Properties
ClusterManifest
Returns the ClusterManifest for the current NEONKUBE build. This is generated by the internal neon-image prepare node ... tool command which prepares node images. This manifest describes the container images that will be provisioned into clusters.
The cluster manifest is uploaded to our S3 bucket at NeonClusterManifestUri and is available from there and for installed neon-desktop and neon-cli applications, the cluster manifest will also be persisted as cluster-manifest.json in the app installation folder.
This property first attempts to loads (and caches) the manifest from the local cluster-manifest.json file and then falls back to downloading it from S3.
Declaration
public static ClusterManifest ClusterManifest { get; }
Property Value
| Type | Description |
|---|---|
| ClusterManifest |
Resources
Returns the IStaticDirectory for the assembly's resources.
Declaration
public static IStaticDirectory Resources { get; }
Property Value
| Type | Description |
|---|---|
| IStaticDirectory |
Methods
CalculateResourceRequirements(ISetupController)
Executed very early during cluster setup to determine service/pod requests and limits as a KubeClusterAdvice instance that will then be made available to the subquent setup steps as the ClusterAdvice property value.
This gives cluster setup a chance to holistically examine the services as well as the resources available to the entire cluster to configure these values.
Declaration
public static void CalculateResourceRequirements(ISetupController controller)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
ConfigureApiserverIngressAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Configures external apiserver access.
Declaration
public static Task ConfigureApiserverIngressAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
ConfigureClusterCertificatesAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Configures the cluster certificates.
Declaration
public static Task ConfigureClusterCertificatesAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | |
| NodeSshProxy<NodeDefinition> | controlNode |
Returns
| Type | Description |
|---|---|
| Task |
ConfigureControlPlaneTaintsAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Configures pods to be schedule on control-plane nodes when enabled.
Declaration
public static Task ConfigureControlPlaneTaintsAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
ConfigureDesktopClusterCertificatesAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Renews the cluster certificates for a neeon desktop cluster.
Declaration
public static Task ConfigureDesktopClusterCertificatesAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | |
| NodeSshProxy<NodeDefinition> | controlNode |
Returns
| Type | Description |
|---|---|
| Task |
ConfigureKubelet(ISetupController, IEnumerable<NodeSshProxy<NodeDefinition>>)
Configures the Kubernetes feature gates specified by the FeatureGates dictionary. It does this by editing the API server's static pod manifest located at /etc/kubernetes/manifests/kube-apiserver.yaml on the control-plane nodes as required. This also tweaks the --service-account-issuer option.
Declaration
public static void ConfigureKubelet(ISetupController controller, IEnumerable<NodeSshProxy<NodeDefinition>> controlNodes)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| IEnumerable<NodeSshProxy<NodeDefinition>> | controlNodes | The target control-plane nodes. |
ConfigureKubernetes(ISetupController, NodeSshProxy<NodeDefinition>)
Basic Kubernetes cluster initialization.
Declaration
public static void ConfigureKubernetes(ISetupController controller, NodeSshProxy<NodeDefinition> firstControlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | firstControlNode | The first control-plane node in the cluster where the operation will be performed. |
ConfigureMetadataAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Uploads cluster related metadata to cluster nodes to /etc/neonkube/metadata
Declaration
public static Task ConfigureMetadataAsync(ISetupController controller, NodeSshProxy<NodeDefinition> node)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | node | The target cluster node. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
ConfigurePriorityClassesAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Adds the NEONKUBE standard priority classes to the cluster.
Declaration
public static Task ConfigurePriorityClassesAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
ConfigureWorkstation(ISetupController, NodeSshProxy<NodeDefinition>)
Configures the local workstation.
Declaration
public static void ConfigureWorkstation(ISetupController controller, NodeSshProxy<NodeDefinition> firstControlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | firstControlNode | The first control-plane node in the cluster where the operation will be performed. |
ConnectCluster(ISetupController)
Connects to a Kubernetes cluster if it already exists. This sets the K8sClient property in the setup controller state when Kubernetes is running and a connection has not already been established.
note
The K8sClient will not be set when Kubernetes has not been started, so Get<TValue>(string) calls for this property will fail when the cluster has not been connected yet, which will be useful for debugging setup steps that require a connection but this hasn't happened yet.
Declaration
public static void ConnectCluster(ISetupController controller)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
CreateClusterPrepareControllerAsync(ClusterDefinition, bool, PrepareClusterOptions)
Constructs the ISetupController to be used for preparing a cluster.
Declaration
public static Task<ISetupController> CreateClusterPrepareControllerAsync(ClusterDefinition clusterDefinition, bool cloudMarketplace, PrepareClusterOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ClusterDefinition | clusterDefinition | The cluster definition. |
| bool | cloudMarketplace |
For cloud environments, this specifies whether the cluster should be provisioned
using a VM image from the public cloud marketplace when noteOnly NEONFORGE maintainers will have permission to use the private image. |
| PrepareClusterOptions | options | Specifies the cluster prepare options. |
Returns
| Type | Description |
|---|---|
| Task<ISetupController> | The ISetupController. |
Exceptions
| Type | Condition |
|---|---|
| NeonKubeException | Thrown when there's a problem. |
CreateClusterSetupControllerAsync(ClusterDefinition, bool, SetupClusterOptions)
Constructs the ISetupController to be used for setting up a cluster.
Declaration
public static Task<ISetupController> CreateClusterSetupControllerAsync(ClusterDefinition clusterDefinition, bool cloudMarketplace, SetupClusterOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ClusterDefinition | clusterDefinition | The cluster definition. |
| bool | cloudMarketplace |
For cloud environments, this specifies whether the cluster should be provisioned
using a VM image from the public cloud marketplace when noteOnly NEONFORGE maintainers will have permission to use the private image. |
| SetupClusterOptions | options | Specifies the cluster setup options. |
Returns
| Type | Description |
|---|---|
| Task<ISetupController> | The ISetupController. |
Exceptions
| Type | Condition |
|---|---|
| NeonKubeException | Thrown when there's a problem. |
CreateCstorStorageClass(ISetupController, NodeSshProxy<NodeDefinition>, string, string, int, bool)
Creates an OpenEBS cStor Kubernetes Storage Class.
Declaration
public static Task CreateCstorStorageClass(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode, string name, string cstorPoolCluster = "cspc-stripe", int replicaCount = 3, bool isDefault = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
| string | name | The new V1StorageClass name. |
| string | cstorPoolCluster | Specifies the cStor pool name. |
| int | replicaCount | Specifies the data replication factor. |
| bool | isDefault | Specifies whether this should be the default storage class. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
CreateDashboardsAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Creates the standard dashboard resources.
Declaration
public static Task CreateDashboardsAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
CreateHostPathStorageClass(ISetupController, NodeSshProxy<NodeDefinition>, string, bool)
Creates a Kubernetes Storage Class.
Declaration
public static Task CreateHostPathStorageClass(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode, string name, bool isDefault = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
| string | name | The new V1StorageClass name. |
| bool | isDefault | Specifies whether this should be the default storage class. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
CreateJivaStorageClass(ISetupController, NodeSshProxy<NodeDefinition>, string, int, string, bool)
Creates a Kubernetes Storage Class.
Declaration
public static Task CreateJivaStorageClass(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode, string name, int replicaCount = 3, string storagePool = "default", bool isDefault = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
| string | name | The new V1StorageClass name. |
| int | replicaCount | Specifies the data replication factor. |
| string | storagePool | Specifies the OpenEBS storage pool. |
| bool | isDefault | Optionally indicates that this is the default storage class. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
CreateNamespaceAsync(ISetupController, NodeSshProxy<NodeDefinition>, string, bool)
Creates a Kubernetes namespace.
Declaration
public static Task CreateNamespaceAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode, string name, bool istioInjectionEnabled = true)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
| string | name | The new WatchNamespace name. |
| bool | istioInjectionEnabled | Whether Istio sidecar injection should be enabled. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
CreateNamespacesAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Creates the required namespaces.
Declaration
public static Task CreateNamespacesAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
CreateNeonDashboardAsync(ISetupController, NodeSshProxy<NodeDefinition>, string, string, string, bool, int)
Creates a V1NeonDashboard idempotently.
Declaration
public static Task CreateNeonDashboardAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode, string name, string url, string displayName = null, bool enabled = true, int displayOrder = 2147483647)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
| string | name | The new bucket name. |
| string | url | The dashboard URL |
| string | displayName | The Dashboard display name. |
| bool | enabled | Optionally specify whether the dashboard is enabled. |
| int | displayOrder | Optionally specify the display order. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
CreateRootUserAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Configures the root Kubernetes user.
Declaration
public static Task CreateRootUserAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
CreateStorageClass(ISetupController, NodeSshProxy<NodeDefinition>, string, int, bool)
Creates the approperiate OpenEBS Kubernetes Storage Class for the cluster.
Declaration
public static Task CreateStorageClass(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode, string name, int replicaCount = 3, bool isDefault = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
| string | name | The new V1StorageClass name. |
| int | replicaCount | Specifies the data replication factor. |
| bool | isDefault | Specifies whether this should be the default storage class. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
GenerateKubernetesClusterConfig(ISetupController, NodeSshProxy<NodeDefinition>)
Method to generate Kubernetes cluster configuration.
Declaration
public static string GenerateKubernetesClusterConfig(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| string | The YAML with the Kubernetes config used to initialize the cluster. |
GetDesktopClusterDefinition(HostingEnvironment, string)
Returns the cluster definition required to prepare a NEONDESKTOP cluster for a specific hosting environment.
Declaration
public static ClusterDefinition GetDesktopClusterDefinition(HostingEnvironment hostEnvironment, string deploymentPrefix = null)
Parameters
| Type | Name | Description |
|---|---|---|
| HostingEnvironment | hostEnvironment | Specifies the target environment. |
| string | deploymentPrefix | Optionally specifies a deployment prefix string to be set as Prefix in the cluster definition returned. This can be used by ClusterFixture and custom tools to help isolated temporary cluster assets from production clusters. |
Returns
| Type | Description |
|---|---|
| ClusterDefinition | The cluster definition. |
GetK8sClient(ISetupController)
Returns the IKubernetes client persisted in the controller passed.
Declaration
public static IKubernetes GetK8sClient(ISetupController controller)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
Returns
| Type | Description |
|---|---|
| IKubernetes | The Neon.Kubernetes client. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown when there is no persisted Kubernetes client, indicating that ConnectCluster(ISetupController) has not been called yet. |
GetSystemDatabaseConnectionStringAsync(ISetupController)
Returns the Postgres connection string for the default database for the cluster's NeonSystemDb deployment.
Declaration
public static Task<string> GetSystemDatabaseConnectionStringAsync(ISetupController controller)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
Returns
| Type | Description |
|---|---|
| Task<string> | The connection string. |
GetTaintsAsync(ISetupController, string, string)
Gets a list of taints that are currently applied to all nodes matching the given node label/value pair.
Declaration
public static Task<List<V1Taint>> GetTaintsAsync(ISetupController controller, string labelKey, string labelValue)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| string | labelKey | The target nodes label key. |
| string | labelValue | The target nodes label value. |
Returns
| Type | Description |
|---|---|
| Task<List<V1Taint>> | The taint list. |
InstallCalicoCniAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs the Calico CNI.
Declaration
public static Task InstallCalicoCniAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallCertManagerAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs CertManager.
Declaration
public static Task InstallCertManagerAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallClusterOperatorAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs neon-cluster-operator.
Declaration
public static Task InstallClusterOperatorAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallContainerRegistryResourcesAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Adds custom V1NeonContainerRegistry resources defined in the cluster definition to the cluster. neon-node-agent will pick these up and regenerate the CRI-O configuration.
Declaration
public static Task InstallContainerRegistryResourcesAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
Remarks
note
This must be called after InstallClusterOperatorAsync(ISetupController, NodeSshProxy<NodeDefinition>) because that's where the cluster CRDs get installed.
InstallCrdsAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs CRDs used later on in setup by various helm charts.
Declaration
public static Task InstallCrdsAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallDexAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Dex.
Declaration
public static Task InstallDexAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallGlauthAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Glauth.
Declaration
public static Task InstallGlauthAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallGrafanaAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Grafana to the monitoring namespace.
Declaration
public static Task InstallGrafanaAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallHarborAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs a harbor container registry and required components.
Declaration
public static Task InstallHarborAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallIstioAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Istio.
Declaration
public static Task InstallIstioAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallKubeDashboardAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Configures the root Kubernetes user.
Declaration
public static Task InstallKubeDashboardAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallKubeStateMetricsAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Kube State Metrics to the monitoring namespace.
Declaration
public static Task InstallKubeStateMetricsAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallLokiAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Loki to the monitoring namespace.
Declaration
public static Task InstallLokiAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallMemcachedAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Memcached to the neon-system namespace.
Declaration
public static Task InstallMemcachedAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallMetricsServerAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs the Kubernetes Metrics Server service.
Declaration
public static Task InstallMetricsServerAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallMimirAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Mimir to the monitoring namespace.
Declaration
public static Task InstallMimirAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallMinioAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs a Minio cluster to the monitoring namespace.
Declaration
public static Task InstallMinioAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallMonitoringAsync(ISetupController)
Installs an Neon Monitoring to the monitoring namespace.
Declaration
public static Task InstallMonitoringAsync(ISetupController controller)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallNeonCloudTokenAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs tokens needed to authenticate with NeonCLOUD services.
Declaration
public static Task InstallNeonCloudTokenAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallNeonSsoProxyAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Neon SSO Session Proxy.
Declaration
public static Task InstallNeonSsoProxyAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallNodeAgentAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs neon-node-agent.
Declaration
public static Task InstallNodeAgentAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallNodeProblemDetectorAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs the Node Problem Detector.
Declaration
public static Task InstallNodeProblemDetectorAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallOauth2ProxyAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Oauth2-proxy.
Declaration
public static Task InstallOauth2ProxyAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallOpenEbsAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs OpenEBS.
Declaration
public static Task InstallOpenEbsAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallPrometheusAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs The Grafana Agent to the monitoring namespace.
Declaration
public static Task InstallPrometheusAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallRedisAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs a harbor container registry and required components.
Declaration
public static Task InstallRedisAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallReloaderAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Reloader to the Neon system namespace.
Declaration
public static Task InstallReloaderAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallSsoAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Keycloak.
Declaration
public static Task InstallSsoAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallSystemDbAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs a Citus-postgres database used by neon-system services.
Declaration
public static Task InstallSystemDbAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
InstallTempoAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Installs Tempo to the monitoring namespace.
Declaration
public static Task InstallTempoAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
KubeSetupAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Some initial kubernetes configuration.
Declaration
public static Task KubeSetupAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
LabelNodesAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Adds the Kubernetes node labels.
Declaration
public static Task LabelNodesAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The first control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
SetClusterHealthAsync(ISetupController, NodeSshProxy<NodeDefinition>, bool)
Writes the ClusterHealth and ClusterLock config maps to the NeonStatus namespace.
Declaration
public static Task SetClusterHealthAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode, bool ready)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
| bool | ready | Pass |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
SetClusterLockAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Sets the ClusterLock config map in the NeonStatus namespace using the lock setting from the cluster definition.
Declaration
public static Task SetClusterLockAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
SetupClusterAsync(ISetupController, int)
Initializes the cluster on the first manager, joins the remaining control-plane nodes and workers to the cluster and then performs the rest of cluster setup.
Declaration
public static Task SetupClusterAsync(ISetupController controller, int maxParallel = 10)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| int | maxParallel | The maximum number of operations on separate nodes to be performed in parallel. This defaults to defaultMaxParallelNodes. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
SetupEtcdHaProxy(ISetupController, NodeSshProxy<NodeDefinition>)
Configures a local HAProxy container that makes the Kubernetes etcd cluster highly available.
Declaration
public static void SetupEtcdHaProxy(ISetupController controller, NodeSshProxy<NodeDefinition> node)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | node | The node where the operation will be performed. |
StabilizeClusterAsync(ISetupController)
Waits for the a NEONDESKTOP cluster to stabilize.
Declaration
public static Task StabilizeClusterAsync(ISetupController controller)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
TaintNodesAsync(ISetupController)
Adds the node taints.
Declaration
public static Task TaintNodesAsync(ISetupController controller)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
ToSiString(decimal?)
Converts a decimal into a nice byte units string.
Declaration
public static string ToSiString(decimal? value)
Parameters
| Type | Name | Description |
|---|---|---|
| decimal? | value | The input value (or |
Returns
| Type | Description |
|---|---|
| string | The formatted output (or |
ToSiString(double?)
Converts a double value into a nice byte units string.
Declaration
public static string ToSiString(double? value)
Parameters
| Type | Name | Description |
|---|---|---|
| double? | value | The input value (or |
Returns
| Type | Description |
|---|---|
| string | The formatted output (or |
UploadClusterInfoAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Writes the ClusterInfo config map to the NeonStatus namespace.
Declaration
public static Task UploadClusterInfoAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
UploadClusterManifestAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Iploads the cluster manifest as a config..
Declaration
public static Task UploadClusterManifestAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |
UploadCopyright(ISetupController)
Uploads a copyright/trademark text files to all of the cluster nodes.
Declaration
public static void UploadCopyright(ISetupController controller)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
WaitForPrometheusAsync(ISetupController, NodeSshProxy<NodeDefinition>)
Waits for Prometheus to be fully ready.
Declaration
public static Task WaitForPrometheusAsync(ISetupController controller, NodeSshProxy<NodeDefinition> controlNode)
Parameters
| Type | Name | Description |
|---|---|---|
| ISetupController | controller | The setup controller. |
| NodeSshProxy<NodeDefinition> | controlNode | The control-plane node where the operation will be performed. |
Returns
| Type | Description |
|---|---|
| Task | The tracking Task. |