diff --git a/.gitignore b/.gitignore index 289b82f42..a7bd0b67f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ postgres-db/ ui/scripts/ Chart.lock chart/charts/ +.downloads diff --git a/api/v1/checks.go b/api/v1/checks.go index 923281603..2645b75b1 100644 --- a/api/v1/checks.go +++ b/api/v1/checks.go @@ -968,6 +968,17 @@ type ExecConnections struct { Azure *AzureConnection `yaml:"azure,omitempty" json:"azure,omitempty"` } +type GitCheckout struct { + URL string `yaml:"url,omitempty" json:"url,omitempty"` + Connection string `yaml:"connection,omitempty" json:"connection,omitempty"` + Username types.EnvVar `yaml:"username,omitempty" json:"username,omitempty"` + Password types.EnvVar `yaml:"password,omitempty" json:"password,omitempty"` + Certificate types.EnvVar `yaml:"certificate,omitempty" json:"certificate,omitempty"` + // Destination is the full path to where the contents of the URL should be downloaded to. + // If left empty, the sha256 hash of the URL will be used as the dir name. + Destination string `yaml:"destination,omitempty" json:"destination,omitempty"` +} + type ExecCheck struct { Description `yaml:",inline" json:",inline"` Templatable `yaml:",inline" json:",inline"` @@ -975,6 +986,10 @@ type ExecCheck struct { // On windows executed via powershell and in darwin and linux executed using bash Script string `yaml:"script" json:"script"` Connections ExecConnections `yaml:"connections,omitempty" json:"connections,omitempty"` + // EnvVars are the environment variables that are accesible to exec processes + EnvVars []types.EnvVar `yaml:"env,omitempty" json:"env,omitempty"` + // Checkout details the git repository that should be mounted to the process + Checkout *GitCheckout `yaml:"checkout,omitempty" json:"checkout,omitempty"` } func (c ExecCheck) GetType() string { diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index aa828e78e..cbfaf3448 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -1600,6 +1600,18 @@ func (in *ExecCheck) DeepCopyInto(out *ExecCheck) { in.Description.DeepCopyInto(&out.Description) out.Templatable = in.Templatable in.Connections.DeepCopyInto(&out.Connections) + if in.EnvVars != nil { + in, out := &in.EnvVars, &out.EnvVars + *out = make([]types.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Checkout != nil { + in, out := &in.Checkout, &out.Checkout + *out = new(GitCheckout) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCheck. @@ -1846,6 +1858,24 @@ func (in *Git) DeepCopy() *Git { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitCheckout) DeepCopyInto(out *GitCheckout) { + *out = *in + in.Username.DeepCopyInto(&out.Username) + in.Password.DeepCopyInto(&out.Password) + in.Certificate.DeepCopyInto(&out.Certificate) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitCheckout. +func (in *GitCheckout) DeepCopy() *GitCheckout { + if in == nil { + return nil + } + out := new(GitCheckout) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GitHubCheck) DeepCopyInto(out *GitHubCheck) { *out = *in diff --git a/checks/exec.go b/checks/exec.go index 3da78efcd..5996d3226 100644 --- a/checks/exec.go +++ b/checks/exec.go @@ -3,19 +3,19 @@ package checks import ( "bytes" "fmt" - "math/rand" "os" osExec "os/exec" "path/filepath" "runtime" "strings" - textTemplate "text/template" "github.com/flanksource/canary-checker/api/context" "github.com/flanksource/canary-checker/api/external" v1 "github.com/flanksource/canary-checker/api/v1" "github.com/flanksource/canary-checker/pkg" - "github.com/flanksource/commons/logger" + "github.com/flanksource/commons/files" + "github.com/flanksource/commons/hash" + "github.com/flanksource/duty/models" ) type ExecChecker struct { @@ -36,48 +36,132 @@ func (c *ExecChecker) Run(ctx *context.Context) pkg.Results { for _, conf := range ctx.Canary.Spec.Exec { results = append(results, c.Check(ctx, conf)...) } + return results } +type execEnv struct { + envs []string + mountPoint string +} + +func (c *ExecChecker) prepareEnvironment(ctx *context.Context, check v1.ExecCheck) (*execEnv, error) { + var result execEnv + + for _, env := range check.EnvVars { + val, err := ctx.GetEnvValueFromCache(env) + if err != nil { + return nil, fmt.Errorf("error fetching env value (name=%s): %w", env.Name, err) + } + + result.envs = append(result.envs, fmt.Sprintf("%s=%s", env.Name, val)) + } + + if check.Checkout != nil { + sourceURL := check.Checkout.URL + + if connection, err := ctx.HydrateConnectionByURL(check.Checkout.Connection); err != nil { + return nil, fmt.Errorf("error hydrating connection: %w", err) + } else if connection != nil { + goGetterURL, err := connection.AsGoGetterURL() + if err != nil { + return nil, fmt.Errorf("error getting go getter URL: %w", err) + } + sourceURL = goGetterURL + } + + if sourceURL == "" { + return nil, fmt.Errorf("error checking out. missing URL") + } + + result.mountPoint = check.Checkout.Destination + if result.mountPoint == "" { + pwd, _ := os.Getwd() + result.mountPoint = filepath.Join(pwd, ".downloads", hash.Sha256Hex(sourceURL)) + } + + if err := files.Getter(sourceURL, result.mountPoint); err != nil { + return nil, fmt.Errorf("error checking out %s: %w", sourceURL, err) + } + } + + return &result, nil +} + func (c *ExecChecker) Check(ctx *context.Context, extConfig external.Check) pkg.Results { check := extConfig.(v1.ExecCheck) + + env, err := c.prepareEnvironment(ctx, check) + if err != nil { + return []*pkg.CheckResult{pkg.Fail(check, ctx.Canary).Failf("something went wrong while preparing exec env: %v", err)} + } + switch runtime.GOOS { case "windows": - return execPowershell(check, ctx) + return execPowershell(ctx, check, env) default: - return execBash(check, ctx) + return execBash(ctx, check, env) } } -func execPowershell(check v1.ExecCheck, ctx *context.Context) pkg.Results { +func execPowershell(ctx *context.Context, check v1.ExecCheck, envParams *execEnv) pkg.Results { result := pkg.Success(check, ctx.Canary) ps, err := osExec.LookPath("powershell.exe") if err != nil { result.Failf("powershell not found") } + args := []string{check.Script} - cmd := osExec.Command(ps, args...) + cmd := osExec.CommandContext(ctx, ps, args...) + if len(envParams.envs) != 0 { + cmd.Env = append(os.Environ(), envParams.envs...) + } + if envParams.mountPoint != "" { + cmd.Dir = envParams.mountPoint + } + + return runCmd(cmd, result) +} + +func execBash(ctx *context.Context, check v1.ExecCheck, envParams *execEnv) pkg.Results { + result := pkg.Success(check, ctx.Canary) + fields := strings.Fields(check.Script) + if len(fields) == 0 { + return []*pkg.CheckResult{result.Failf("no script provided")} + } + + cmd := osExec.CommandContext(ctx, "bash", "-c", check.Script) + if len(envParams.envs) != 0 { + cmd.Env = append(os.Environ(), envParams.envs...) + } + if envParams.mountPoint != "" { + cmd.Dir = envParams.mountPoint + } + + if err := setupConnection(ctx, check, cmd); err != nil { + return []*pkg.CheckResult{result.Failf("failed to setup connection: %v", err)} + } + return runCmd(cmd, result) } func setupConnection(ctx *context.Context, check v1.ExecCheck, cmd *osExec.Cmd) error { + var envPreps []models.EnvPrep + if check.Connections.AWS != nil { if err := check.Connections.AWS.Populate(ctx, ctx.Kubernetes, ctx.Namespace); err != nil { return fmt.Errorf("failed to hydrate aws connection: %w", err) } - configPath, err := saveConfig(awsConfigTemplate, check.Connections.AWS) - defer os.RemoveAll(filepath.Dir(configPath)) - if err != nil { - return fmt.Errorf("failed to store AWS credentials: %w", err) - } - - cmd.Env = os.Environ() - cmd.Env = append(cmd.Env, "AWS_EC2_METADATA_DISABLED=true") // https://github.com/aws/aws-cli/issues/5262#issuecomment-705832151 - cmd.Env = append(cmd.Env, fmt.Sprintf("AWS_SHARED_CREDENTIALS_FILE=%s", configPath)) - if check.Connections.AWS.Region != "" { - cmd.Env = append(cmd.Env, fmt.Sprintf("AWS_DEFAULT_REGION=%s", check.Connections.AWS.Region)) + c := models.Connection{ + Type: models.ConnectionTypeAWS, + Username: check.Connections.AWS.AccessKey.ValueStatic, + Password: check.Connections.AWS.SecretKey.ValueStatic, + Properties: map[string]string{ + "region": check.Connections.AWS.Region, + }, } + envPreps = append(envPreps, c.AsEnv(ctx)) } if check.Connections.Azure != nil { @@ -85,11 +169,15 @@ func setupConnection(ctx *context.Context, check v1.ExecCheck, cmd *osExec.Cmd) return fmt.Errorf("failed to hydrate connection %w", err) } - // login with service principal - runCmd := osExec.Command("az", "login", "--service-principal", "--username", check.Connections.Azure.ClientID.ValueStatic, "--password", check.Connections.Azure.ClientSecret.ValueStatic, "--tenant", check.Connections.Azure.TenantID) - if err := runCmd.Run(); err != nil { - return fmt.Errorf("failed to login: %w", err) + c := models.Connection{ + Type: models.ConnectionTypeAzure, + Username: check.Connections.Azure.ClientID.ValueStatic, + Password: check.Connections.Azure.ClientSecret.ValueStatic, + Properties: map[string]string{ + "tenant": check.Connections.Azure.TenantID, + }, } + envPreps = append(envPreps, c.AsEnv(ctx)) } if check.Connections.GCP != nil { @@ -97,41 +185,30 @@ func setupConnection(ctx *context.Context, check v1.ExecCheck, cmd *osExec.Cmd) return fmt.Errorf("failed to hydrate connection %w", err) } - configPath, err := saveConfig(gcloudConfigTemplate, check.Connections.GCP) - defer os.RemoveAll(filepath.Dir(configPath)) - if err != nil { - return fmt.Errorf("failed to store gcloud credentials: %w", err) + c := models.Connection{ + Type: models.ConnectionTypeGCP, + Certificate: check.Connections.GCP.Credentials.ValueStatic, + URL: check.Connections.GCP.Endpoint, } + envPreps = append(envPreps, c.AsEnv(ctx)) + } - // to configure gcloud CLI to use the service account specified in GOOGLE_APPLICATION_CREDENTIALS, - // we need to explicitly activate it - runCmd := osExec.Command("gcloud", "auth", "activate-service-account", "--key-file", configPath) - if err := runCmd.Run(); err != nil { - return fmt.Errorf("failed to activate GCP service account: %w", err) + for _, envPrep := range envPreps { + preRuns, err := envPrep.Inject(ctx, cmd) + if err != nil { + return err } - cmd.Env = os.Environ() - cmd.Env = append(cmd.Env, fmt.Sprintf("GOOGLE_APPLICATION_CREDENTIALS=%s", configPath)) + for _, run := range preRuns { + if err := run.Run(); err != nil { + return err + } + } } return nil } -func execBash(check v1.ExecCheck, ctx *context.Context) pkg.Results { - result := pkg.Success(check, ctx.Canary) - fields := strings.Fields(check.Script) - if len(fields) == 0 { - return []*pkg.CheckResult{result.Failf("no script provided")} - } - - cmd := osExec.Command("bash", "-c", check.Script) - if err := setupConnection(ctx, check, cmd); err != nil { - return []*pkg.CheckResult{result.Failf("failed to setup connection: %v", err)} - } - - return runCmd(cmd, result) -} - func runCmd(cmd *osExec.Cmd, result *pkg.CheckResult) (results pkg.Results) { var stdout bytes.Buffer var stderr bytes.Buffer @@ -151,40 +228,3 @@ func runCmd(cmd *osExec.Cmd, result *pkg.CheckResult) (results pkg.Results) { results = append(results, result) return results } - -func saveConfig(configTemplate *textTemplate.Template, view any) (string, error) { - dirPath := filepath.Join(".creds", fmt.Sprintf("cred-%d", rand.Intn(10000000))) - if err := os.MkdirAll(dirPath, 0700); err != nil { - return "", err - } - - configPath := fmt.Sprintf("%s/credentials", dirPath) - logger.Tracef("Creating credentials file: %s", configPath) - - file, err := os.Create(configPath) - if err != nil { - return configPath, err - } - defer file.Close() - - if err := configTemplate.Execute(file, view); err != nil { - return configPath, err - } - - return configPath, nil -} - -var ( - awsConfigTemplate *textTemplate.Template - gcloudConfigTemplate *textTemplate.Template -) - -func init() { - awsConfigTemplate = textTemplate.Must(textTemplate.New("").Parse(`[default] -aws_access_key_id = {{.AccessKey.ValueStatic}} -aws_secret_access_key = {{.SecretKey.ValueStatic}} -{{if .SessionToken.ValueStatic}}aws_session_token={{.SessionToken.ValueStatic}}{{end}} -`)) - - gcloudConfigTemplate = textTemplate.Must(textTemplate.New("").Parse(`{{.Credentials}}`)) -} diff --git a/checks/http.go b/checks/http.go index 79e177943..9a79db811 100644 --- a/checks/http.go +++ b/checks/http.go @@ -10,6 +10,7 @@ import ( "github.com/flanksource/canary-checker/api/context" "github.com/flanksource/commons/http" + "github.com/flanksource/commons/http/middlewares" "github.com/flanksource/duty/models" gomplate "github.com/flanksource/gomplate/v3" @@ -80,7 +81,12 @@ func (c *HTTPChecker) generateHTTPRequest(ctx *context.Context, check v1.HTTPChe } if check.Oauth2 != nil { - client.OAuth(connection.Username, connection.Password, check.Oauth2.TokenURL, check.Oauth2.Scopes...) + client.OAuth(middlewares.OauthConfig{ + ClientID: connection.Username, + ClientSecret: connection.Password, + TokenURL: check.Oauth2.TokenURL, + Scopes: check.Oauth2.Scopes, + }) } client.NTLM(check.NTLM) diff --git a/config/deploy/crd.yaml b/config/deploy/crd.yaml index f80c8d552..8747608ed 100644 --- a/config/deploy/crd.yaml +++ b/config/deploy/crd.yaml @@ -2105,6 +2105,101 @@ spec: exec: items: properties: + checkout: + description: Checkout details the git repository that should be mounted to the process + properties: + certificate: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + type: object + type: object + connection: + type: string + destination: + description: Destination is the full path to where the contents of the URL should be downloaded to. If left empty, the sha256 hash of the URL will be used as the dir name. + type: string + password: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + type: object + type: object + url: + type: string + username: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + type: object + type: object + type: object connections: properties: aws: @@ -2324,6 +2419,37 @@ spec: template: type: string type: object + env: + description: EnvVars are the environment variables that are accesible to exec processes + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + type: object + type: object + type: array icon: description: Icon for overwriting default icon on the dashboard type: string diff --git a/config/deploy/manifests.yaml b/config/deploy/manifests.yaml index 690074867..d4d174373 100644 --- a/config/deploy/manifests.yaml +++ b/config/deploy/manifests.yaml @@ -2105,6 +2105,101 @@ spec: exec: items: properties: + checkout: + description: Checkout details the git repository that should be mounted to the process + properties: + certificate: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + type: object + type: object + connection: + type: string + destination: + description: Destination is the full path to where the contents of the URL should be downloaded to. If left empty, the sha256 hash of the URL will be used as the dir name. + type: string + password: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + type: object + type: object + url: + type: string + username: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + type: object + type: object + type: object connections: properties: aws: @@ -2324,6 +2419,37 @@ spec: template: type: string type: object + env: + description: EnvVars are the environment variables that are accesible to exec processes + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + secretKeyRef: + properties: + key: + type: string + name: + type: string + required: + - key + type: object + type: object + type: object + type: array icon: description: Icon for overwriting default icon on the dashboard type: string diff --git a/config/schemas/canary.schema.json b/config/schemas/canary.schema.json index f380d963e..b40faea98 100644 --- a/config/schemas/canary.schema.json +++ b/config/schemas/canary.schema.json @@ -1394,6 +1394,15 @@ }, "connections": { "$ref": "#/$defs/ExecConnections" + }, + "env": { + "items": { + "$ref": "#/$defs/EnvVar" + }, + "type": "array" + }, + "checkout": { + "$ref": "#/$defs/GitCheckout" } }, "additionalProperties": false, @@ -1560,6 +1569,30 @@ "instance" ] }, + "GitCheckout": { + "properties": { + "url": { + "type": "string" + }, + "connection": { + "type": "string" + }, + "username": { + "$ref": "#/$defs/EnvVar" + }, + "password": { + "$ref": "#/$defs/EnvVar" + }, + "certificate": { + "$ref": "#/$defs/EnvVar" + }, + "destination": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "GitHubCheck": { "properties": { "description": { diff --git a/config/schemas/component.schema.json b/config/schemas/component.schema.json index c5f40cf4f..be7245517 100644 --- a/config/schemas/component.schema.json +++ b/config/schemas/component.schema.json @@ -1573,6 +1573,15 @@ }, "connections": { "$ref": "#/$defs/ExecConnections" + }, + "env": { + "items": { + "$ref": "#/$defs/EnvVar" + }, + "type": "array" + }, + "checkout": { + "$ref": "#/$defs/GitCheckout" } }, "additionalProperties": false, @@ -1772,6 +1781,30 @@ "instance" ] }, + "GitCheckout": { + "properties": { + "url": { + "type": "string" + }, + "connection": { + "type": "string" + }, + "username": { + "$ref": "#/$defs/EnvVar" + }, + "password": { + "$ref": "#/$defs/EnvVar" + }, + "certificate": { + "$ref": "#/$defs/EnvVar" + }, + "destination": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "GitHubCheck": { "properties": { "description": { diff --git a/config/schemas/health_exec.schema.json b/config/schemas/health_exec.schema.json index afe65cfc6..8e9f4948d 100644 --- a/config/schemas/health_exec.schema.json +++ b/config/schemas/health_exec.schema.json @@ -133,6 +133,15 @@ }, "connections": { "$ref": "#/$defs/ExecConnections" + }, + "env": { + "items": { + "$ref": "#/$defs/EnvVar" + }, + "type": "array" + }, + "checkout": { + "$ref": "#/$defs/GitCheckout" } }, "additionalProperties": false, @@ -172,6 +181,30 @@ "additionalProperties": false, "type": "object" }, + "GitCheckout": { + "properties": { + "url": { + "type": "string" + }, + "connection": { + "type": "string" + }, + "username": { + "$ref": "#/$defs/EnvVar" + }, + "password": { + "$ref": "#/$defs/EnvVar" + }, + "certificate": { + "$ref": "#/$defs/EnvVar" + }, + "destination": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "Labels": { "patternProperties": { ".*": { diff --git a/config/schemas/topology.schema.json b/config/schemas/topology.schema.json index dca59a7db..368a4e4ed 100644 --- a/config/schemas/topology.schema.json +++ b/config/schemas/topology.schema.json @@ -1543,6 +1543,15 @@ }, "connections": { "$ref": "#/$defs/ExecConnections" + }, + "env": { + "items": { + "$ref": "#/$defs/EnvVar" + }, + "type": "array" + }, + "checkout": { + "$ref": "#/$defs/GitCheckout" } }, "additionalProperties": false, @@ -1742,6 +1751,30 @@ "instance" ] }, + "GitCheckout": { + "properties": { + "url": { + "type": "string" + }, + "connection": { + "type": "string" + }, + "username": { + "$ref": "#/$defs/EnvVar" + }, + "password": { + "$ref": "#/$defs/EnvVar" + }, + "certificate": { + "$ref": "#/$defs/EnvVar" + }, + "destination": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "GitHubCheck": { "properties": { "description": { diff --git a/fixtures/minimal/exec_checkout_pass.yaml b/fixtures/minimal/exec_checkout_pass.yaml new file mode 100644 index 000000000..344019a6a --- /dev/null +++ b/fixtures/minimal/exec_checkout_pass.yaml @@ -0,0 +1,15 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: exec-checkout +spec: + interval: 30 + exec: + - name: exec-checkout + description: "exec with git" + script: | + cat go.mod | head -n 1 + checkout: + url: github.com/flanksource/duty + test: + expr: 'results.stdout == "module github.com/flanksource/duty"' diff --git a/fixtures/minimal/exec_connection_aws_fail.yaml b/fixtures/minimal/exec_connection_aws_fail.yaml new file mode 100644 index 000000000..3f6b09040 --- /dev/null +++ b/fixtures/minimal/exec_connection_aws_fail.yaml @@ -0,0 +1,17 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: aws-exec + labels: + "Expected-Fail": "true" +spec: + interval: 30 + exec: + - name: aws-exec-check + description: "exec s3 list" + script: aws s3 ls | head -n 1 + connections: + aws: + connection: connection://AWS/flanksource + test: + expr: results.stdout == '2023-05-25 11:49:22 cf-templates-3ci8g0qv95rq-eu-west-1' diff --git a/fixtures/minimal/exec_env_pass.yaml b/fixtures/minimal/exec_env_pass.yaml new file mode 100644 index 000000000..7f3f33fc0 --- /dev/null +++ b/fixtures/minimal/exec_env_pass.yaml @@ -0,0 +1,18 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: exec-env +spec: + interval: 30 + exec: + - name: exec-env + description: "exec with env" + script: | + echo -n ${FL_HELLO} ${FL_WORLD} + env: + - name: FL_HELLO + value: "hello" + - name: FL_WORLD + value: "world" + test: + expr: 'results.stdout == "hello world"' diff --git a/fixtures/minimal/http_auth.yaml b/fixtures/minimal/http_auth.yaml index d557779f1..2b4fe1f18 100644 --- a/fixtures/minimal/http_auth.yaml +++ b/fixtures/minimal/http_auth.yaml @@ -4,9 +4,11 @@ metadata: name: http-basic-auth spec: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + - name: "basic auth fail" + endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world responseCodes: [401] - - endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + - name: "basic auth pass" + endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world responseCodes: [200] username: value: hello diff --git a/go.mod b/go.mod index abf2f98aa..5abc126f6 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.20 require ( cloud.google.com/go/storage v1.33.0 - github.com/PaesslerAG/jsonpath v0.1.1 github.com/allegro/bigcache v1.2.1 github.com/asecurityteam/rolling v2.0.4+incompatible github.com/aws/aws-sdk-go-v2 v1.21.0 @@ -21,8 +20,8 @@ require ( github.com/eko/gocache/store/bigcache/v4 v4.2.1 github.com/elastic/go-elasticsearch/v8 v8.10.0 github.com/fergusstrange/embedded-postgres v1.24.0 - github.com/flanksource/duty v1.0.197 - github.com/flanksource/commons v1.16.0 + github.com/flanksource/commons v1.17.0 + github.com/flanksource/duty v1.0.201 github.com/flanksource/gomplate/v3 v3.20.18 github.com/flanksource/is-healthy v0.0.0-20231003215854-76c51e3a3ff7 github.com/flanksource/kommons v0.31.4 @@ -89,14 +88,13 @@ require ( github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect - github.com/PaesslerAG/gval v1.2.2 // indirect github.com/TomOnTime/utfutil v0.0.0-20230223141146-125e65197b36 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect github.com/antonmedv/expr v1.15.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.45.27 // indirect + github.com/aws/aws-sdk-go v1.45.28 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect @@ -168,7 +166,7 @@ require ( github.com/hashicorp/go-getter v1.7.3 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hcl/v2 v2.19.0 // indirect + github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/itchyny/gojq v0.12.13 // indirect @@ -209,7 +207,6 @@ require ( github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/sethvargo/go-retry v0.2.4 // indirect - github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/tidwall/gjson v1.17.0 // indirect diff --git a/go.sum b/go.sum index 39604ce9e..8240c2962 100644 --- a/go.sum +++ b/go.sum @@ -625,12 +625,6 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PaesslerAG/gval v1.0.0/go.mod h1:y/nm5yEyTeX6av0OfKJNp9rBNj2XrGhAf5+v24IBN1I= -github.com/PaesslerAG/gval v1.2.2 h1:Y7iBzhgE09IGTt5QgGQ2IdaYYYOU134YGHBThD+wm9E= -github.com/PaesslerAG/gval v1.2.2/go.mod h1:XRFLwvmkTEdYziLdaCeCa5ImcGVrfQbeNUbVR+C6xac= -github.com/PaesslerAG/jsonpath v0.1.0/go.mod h1:4BzmtoM/PI8fPO4aQGIusjGxGir2BzcV0grWtFzq1Y8= -github.com/PaesslerAG/jsonpath v0.1.1 h1:c1/AToHQMVsduPAa4Vh6xp2U0evy4t8SWp8imEsylIk= -github.com/PaesslerAG/jsonpath v0.1.1/go.mod h1:lVboNxFGal/VwW6d9JzIy56bUsYAP6tH/x80vjnCseY= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/TomOnTime/utfutil v0.0.0-20230223141146-125e65197b36 h1:vfVc5pSCq58ljNpXXwUcLnHATYi/x+YUdqFc9uBhLbM= @@ -674,8 +668,8 @@ github.com/asecurityteam/rolling v2.0.4+incompatible h1:WOSeokINZT0IDzYGc5BVcjLl github.com/asecurityteam/rolling v2.0.4+incompatible/go.mod h1:2D4ba5ZfYCWrIMleUgTvc8pmLExEuvu3PDwl+vnG58Q= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go v1.45.27 h1:b+zOTPkAG4i2RvqPdHxkJZafmhhVaVHBp4r41Tu4I6U= -github.com/aws/aws-sdk-go v1.45.27/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.45.28 h1:p2ATcaK6ffSw4yZ2UAGzgRyRXwKyOJY6ZCiKqj5miJE= +github.com/aws/aws-sdk-go v1.45.28/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= @@ -819,10 +813,10 @@ github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fergusstrange/embedded-postgres v1.24.0 h1:WqXbmYrBeT5JfNWQ8Qa+yHa5YJO/0sBIgL9k5rn3dFk= github.com/fergusstrange/embedded-postgres v1.24.0/go.mod h1:wL562t1V+iuFwq0UcgMi2e9rp8CROY9wxWZEfP8Y874= -github.com/flanksource/duty v1.0.197 h1:KRw4EPAD2kcqNPkipnkHzlbf5wmLqg3JgtXqiPzCLhw= -github.com/flanksource/duty v1.0.197/go.mod h1:aO1uXnT1eVtiIcicriK4brqJLmeXgbrYWtNR0H5IkLE= -github.com/flanksource/commons v1.16.0 h1:8kxeP9gPAuCKHNxLosi1uk+qIrZFs62YIzfkkneazTg= -github.com/flanksource/commons v1.16.0/go.mod h1:RDdQI0/QYC4GzicbDaXIvBPjWuQWKLzX8/rFBbFjG5U= +github.com/flanksource/commons v1.17.0 h1:rSahn6c4vyq3bPC5jsayET4y8TECRz6Q8NbooItZiGA= +github.com/flanksource/commons v1.17.0/go.mod h1:RDdQI0/QYC4GzicbDaXIvBPjWuQWKLzX8/rFBbFjG5U= +github.com/flanksource/duty v1.0.201 h1:c8r02bfuF47E2svK+qXCLHKaSqOCZZHKPj+v54eimqc= +github.com/flanksource/duty v1.0.201/go.mod h1:aO1uXnT1eVtiIcicriK4brqJLmeXgbrYWtNR0H5IkLE= github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc= github.com/flanksource/gomplate/v3 v3.20.18 h1:qYiznMxhq+Zau5iWnVzW1yDzA1deHOsmo6yldCN7JhQ= github.com/flanksource/gomplate/v3 v3.20.18/go.mod h1:2GgHZ2vWmtDspJMBfUIryOuzJSwc8jU7Kw9fDLr0TMA= @@ -1131,8 +1125,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl/v2 v2.19.0 h1:vq9ncaL/+JtHe2JFQo6h/D7HqkfrYQn+nRYG/WDKmLo= -github.com/hashicorp/hcl/v2 v2.19.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/henvic/httpretty v0.1.2 h1:EQo556sO0xeXAjP10eB+BZARMuvkdGqtfeS4Ntjvkiw= github.com/henvic/httpretty v0.1.2/go.mod h1:ViEsly7wgdugYtymX54pYp6Vv2wqZmNHayJ6q8tlKCc= github.com/hirochachacha/go-smb2 v1.1.0 h1:b6hs9qKIql9eVXAiN0M2wSFY5xnhbHAQoCwRKbaRTZI= @@ -1416,8 +1410,6 @@ github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08O github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/sevennt/echo-pprof v0.1.1-0.20220616082843-66a461746b5f h1:mx2Z/21bNtP+jXvuB9qHJbihaIhT3SsqL+qJUqbwoGg= github.com/sevennt/echo-pprof v0.1.1-0.20220616082843-66a461746b5f/go.mod h1:QPpsWWcK1TiLQ8uaSnmKJamNb2HryXeBxZapurHcGn0= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= -github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -2326,16 +2318,22 @@ k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= k8s.io/api v0.26.4/go.mod h1:WwKEXU3R1rgCZ77AYa7DFksd9/BAIKyOmRlbVxgvjCk= k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= +k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= +k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/apimachinery v0.26.4/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= +k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= +k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= k8s.io/cli-runtime v0.28.0 h1:Tcz1nnccXZDNIzoH6EwjCs+7ezkUGhorzCweEvlVOFg= k8s.io/cli-runtime v0.28.0/go.mod h1:U+ySmOKBm/JUCmebhmecXeTwNN1RzI7DW4+OM8Oryas= k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= +k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= +k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg= k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/hack/generate-schemas/go.mod b/hack/generate-schemas/go.mod index b1b58b6c3..f911fc8bd 100644 --- a/hack/generate-schemas/go.mod +++ b/hack/generate-schemas/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/flanksource/canary-checker v1.0.0 - github.com/flanksource/commons v1.15.1 + github.com/flanksource/commons v1.17.0 github.com/invopop/jsonschema v0.7.0 github.com/spf13/cobra v1.7.0 ) @@ -36,12 +36,12 @@ require ( github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect github.com/antonmedv/expr v1.15.3 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/aws/aws-sdk-go v1.45.27 // indirect + github.com/aws/aws-sdk-go v1.45.28 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/flanksource/duty v1.0.197 // indirect + github.com/flanksource/duty v1.0.201 // indirect github.com/flanksource/is-healthy v0.0.0-20231003215854-76c51e3a3ff7 // indirect github.com/flanksource/mapstructure v1.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -66,7 +66,7 @@ require ( github.com/hashicorp/go-getter v1.7.3 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hcl/v2 v2.19.0 // indirect + github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/itchyny/gojq v0.12.13 // indirect diff --git a/hack/generate-schemas/go.sum b/hack/generate-schemas/go.sum index 5073b2e5a..26628515b 100644 --- a/hack/generate-schemas/go.sum +++ b/hack/generate-schemas/go.sum @@ -637,8 +637,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmms github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.45.27 h1:b+zOTPkAG4i2RvqPdHxkJZafmhhVaVHBp4r41Tu4I6U= -github.com/aws/aws-sdk-go v1.45.27/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.45.28 h1:p2ATcaK6ffSw4yZ2UAGzgRyRXwKyOJY6ZCiKqj5miJE= +github.com/aws/aws-sdk-go v1.45.28/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= @@ -701,10 +701,10 @@ github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQL github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fergusstrange/embedded-postgres v1.24.0 h1:WqXbmYrBeT5JfNWQ8Qa+yHa5YJO/0sBIgL9k5rn3dFk= -github.com/flanksource/commons v1.15.1 h1:cFvxQd5SBFe+q16ciz8Q2IeBMeQ7+atdACGanbW27hg= -github.com/flanksource/commons v1.15.1/go.mod h1:FMZFLcQr98JwBKuKLs44DvCQ2JNoHz5maRIzVufQ9Cs= -github.com/flanksource/duty v1.0.197 h1:KRw4EPAD2kcqNPkipnkHzlbf5wmLqg3JgtXqiPzCLhw= -github.com/flanksource/duty v1.0.197/go.mod h1:aO1uXnT1eVtiIcicriK4brqJLmeXgbrYWtNR0H5IkLE= +github.com/flanksource/commons v1.17.0 h1:rSahn6c4vyq3bPC5jsayET4y8TECRz6Q8NbooItZiGA= +github.com/flanksource/commons v1.17.0/go.mod h1:RDdQI0/QYC4GzicbDaXIvBPjWuQWKLzX8/rFBbFjG5U= +github.com/flanksource/duty v1.0.201 h1:c8r02bfuF47E2svK+qXCLHKaSqOCZZHKPj+v54eimqc= +github.com/flanksource/duty v1.0.201/go.mod h1:aO1uXnT1eVtiIcicriK4brqJLmeXgbrYWtNR0H5IkLE= github.com/flanksource/gomplate/v3 v3.20.4/go.mod h1:27BNWhzzSjDed1z8YShO6W+z6G9oZXuxfNFGd/iGSdc= github.com/flanksource/gomplate/v3 v3.20.18 h1:qYiznMxhq+Zau5iWnVzW1yDzA1deHOsmo6yldCN7JhQ= github.com/flanksource/gomplate/v3 v3.20.18/go.mod h1:2GgHZ2vWmtDspJMBfUIryOuzJSwc8jU7Kw9fDLr0TMA= @@ -904,8 +904,8 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl/v2 v2.19.0 h1:vq9ncaL/+JtHe2JFQo6h/D7HqkfrYQn+nRYG/WDKmLo= -github.com/hashicorp/hcl/v2 v2.19.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA=