Skip to content

Commit

Permalink
feat: allow kurtosis cli to be used behind proxy (kurtosis-tech#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderheijden86 committed Oct 6, 2023
1 parent 57da901 commit 9eadf60
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package v3

/*
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DO NOT CHANGE THIS FILE!
If you change this file, it will break config for users who have instantiated an
overrides file with this version of config overrides!
Instead, to make changes, you will need to add a new version of the config
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/

type KubernetesClusterConfigV3 struct {
KubernetesClusterName *string `yaml:"kubernetes-cluster-name,omitempty"`
StorageClass *string `yaml:"storage-class,omitempty"`
EnclaveSizeInMegabytes *uint `yaml:"enclave-size-in-megabytes,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package v3

/*
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DO NOT CHANGE THIS FILE!
If you change this file, it will break config for users who have instantiated an
overrides file with this version of config overrides!
Instead, to make changes, you will need to add a new version of the config
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/

type KurtosisCloudConfigV3 struct {
ApiUrl *string `yaml:"api-url,omitempty"`
Port *uint `yaml:"port,omitempty"`
CertificateChain *string `yaml:"certificate-chain,omitempty"`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package v3

/*
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DO NOT CHANGE THIS FILE!
If you change this file, it will break config for users who have instantiated an
overrides file with this version of config overrides!
Instead, to make changes, you will need to add a new version of the config
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/

type KurtosisClusterConfigV3 struct {
Type *string `yaml:"type,omitempty"`
// If we ever get another type of cluster that has configuration, this will need to be polymorphically deserialized
Config *KubernetesClusterConfigV3 `yaml:"config,omitempty"`
}
26 changes: 26 additions & 0 deletions cli/cli/kurtosis_config/overrides_objects/v3/kurtosis_config_v3.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package v3

import "github.com/kurtosis-tech/kurtosis/cli/cli/kurtosis_config/config_version"

/*
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
DO NOT CHANGE THIS FILE!
If you change this file, it will break config for users who have instantiated an
overrides file with this version of config overrides!
Instead, to make changes, you will need to add a new version of the config
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/

// NOTE: All new YAML property names here should be kebab-case because
// 1. it's easier to read
// 2. it's easier to write
// 3. it's consistent with previous properties and changing the format of an already-written config file is very difficult
type KurtosisConfigV3 struct {
// vvvvvvvvv Every new Kurtosis config version must have this key vvvvvvvv
ConfigVersion config_version.ConfigVersion `yaml:"config-version"`
// ^^^^^^^^^ Every new Kurtosis config version must have this key ^^^^^^^^

ShouldSendMetrics *bool `yaml:"should-send-metrics,omitempty"`
KurtosisClusters map[string]*KurtosisClusterConfigV3 `yaml:"kurtosis-clusters,omitempty"`
CloudConfig *KurtosisCloudConfigV3 `yaml:"cloud-config,omitempty"`
}
2 changes: 1 addition & 1 deletion core/server/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (
)

require (
github.com/go-git/go-git/v5 v5.4.2
github.com/go-git/go-git/v5 v5.9.0
github.com/go-yaml/yaml v2.1.0+incompatible
github.com/itchyny/gojq v0.12.9
github.com/kurtosis-tech/minimal-grpc-server/golang v0.0.0-20230710164206-90b674acb269
Expand Down
Loading

0 comments on commit 9eadf60

Please sign in to comment.