remove vault server tls
This commit is contained in:
parent
610071e0d5
commit
b308691b50
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue