remove vault server tls

This commit is contained in:
Nikola Jokic 2025-06-09 08:35:19 +02:00
parent 610071e0d5
commit b308691b50
No known key found for this signature in database
GPG Key ID: E4104494F9B8DDF6
7 changed files with 12 additions and 20 deletions

View File

@ -75,7 +75,7 @@ func FromSecret(secret *corev1.Secret) (*AppConfig, error) {
return cfg.tidy(), nil
}
func FromString(v string) (*AppConfig, error) {
func FromJSONString(v string) (*AppConfig, error) {
var appConfig AppConfig
if err := json.NewDecoder(bytes.NewBufferString(v)).Decode(&appConfig); err != nil {
return nil, err

View File

@ -142,7 +142,7 @@ func TestAppConfigFromString_valid(t *testing.T) {
bytes, err := json.Marshal(cfg)
require.NoError(t, err)
got, err := FromString(string(bytes))
got, err := FromJSONString(string(bytes))
require.NoError(t, err)
want := cfg.tidy()

View File

@ -72,9 +72,6 @@ type AutoscalingRunnerSetSpec struct {
// +optional
GitHubServerTLS *TLSConfig `json:"githubServerTLS,omitempty"`
// +optional
VaultServerTLS *TLSConfig `json:"vaultServerTLS,omitempty"`
// +optional
VaultConfig *VaultConfig `json:"vaultConfig,omitempty"`

View File

@ -102,6 +102,9 @@ type EphemeralRunnerSpec struct {
// +required
GitHubConfigSecret string `json:"githubConfigSecret,omitempty"`
// +optional
GitHubServerTLS *TLSConfig `json:"githubServerTLS,omitempty"`
// +required
RunnerScaleSetId int `json:"runnerScaleSetId,omitempty"`
@ -111,9 +114,6 @@ type EphemeralRunnerSpec struct {
// +optional
ProxySecretRef string `json:"proxySecretRef,omitempty"`
// +optional
GitHubServerTLS *TLSConfig `json:"githubServerTLS,omitempty"`
// +optional
VaultConfig *VaultConfig `json:"vaultConfig,omitempty"`

View File

@ -217,11 +217,6 @@ func (in *AutoscalingRunnerSetSpec) DeepCopyInto(out *AutoscalingRunnerSetSpec)
*out = new(TLSConfig)
(*in).DeepCopyInto(*out)
}
if in.VaultServerTLS != nil {
in, out := &in.VaultServerTLS, &out.VaultServerTLS
*out = new(TLSConfig)
(*in).DeepCopyInto(*out)
}
if in.VaultConfig != nil {
in, out := &in.VaultConfig, &out.VaultConfig
*out = new(VaultConfig)
@ -462,16 +457,16 @@ func (in *EphemeralRunnerSetStatus) DeepCopy() *EphemeralRunnerSetStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EphemeralRunnerSpec) DeepCopyInto(out *EphemeralRunnerSpec) {
*out = *in
if in.Proxy != nil {
in, out := &in.Proxy, &out.Proxy
*out = new(ProxyConfig)
(*in).DeepCopyInto(*out)
}
if in.GitHubServerTLS != nil {
in, out := &in.GitHubServerTLS, &out.GitHubServerTLS
*out = new(TLSConfig)
(*in).DeepCopyInto(*out)
}
if in.Proxy != nil {
in, out := &in.Proxy, &out.Proxy
*out = new(ProxyConfig)
(*in).DeepCopyInto(*out)
}
if in.VaultConfig != nil {
in, out := &in.VaultConfig, &out.VaultConfig
*out = new(VaultConfig)

View File

@ -80,7 +80,7 @@ func Read(ctx context.Context, configPath string) (*Config, error) {
return nil, fmt.Errorf("failed to get app config from vault: %w", err)
}
appConfig, err := appconfig.FromString(appConfigRaw)
appConfig, err := appconfig.FromJSONString(appConfigRaw)
if err != nil {
return nil, fmt.Errorf("failed to read app config from string: %v", err)
}

View File

@ -257,7 +257,7 @@ func (r *vaultResolver) appConfig(ctx context.Context, key string) (*appconfig.A
return nil, fmt.Errorf("failed to resolve secret: %v", err)
}
return appconfig.FromString(val)
return appconfig.FromJSONString(val)
}
func (r *vaultResolver) proxyCredentials(ctx context.Context, key string) (*url.Userinfo, error) {