Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Proxy Support #231

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions charts/zora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ The following table lists the configurable parameters of the Zora chart and thei
| operator.log.level | string | `"info"` | Log level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity |
| operator.log.stacktraceLevel | string | `"error"` | Log level at and above which stacktraces are captured (one of 'info', 'error' or 'panic') |
| operator.log.timeEncoding | string | `"rfc3339"` | Log time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano') |
| operator.env | list | `[]` | List of environment variables to set in operator container. Cannot be updated |
| operator.envFrom | list | `[]` | List of sources to populate environment variables in operator container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. |
| scan.misconfiguration.enabled | bool | `true` | Specifies whether misconfiguration scan is enabled |
| scan.misconfiguration.schedule | string | Cron expression for every hour at the current minute + 5 minutes | Cluster scan schedule in Cron format for misconfiguration scan |
| scan.misconfiguration.successfulScansHistoryLimit | int | `1` | The number of successful finished scans and their issues to retain. |
Expand Down
4 changes: 4 additions & 0 deletions charts/zora/templates/operator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ spec:
securityContext:
{{- toYaml .Values.operator.rbacProxy.securityContext | nindent 12 }}
- name: manager
envFrom:
{{- toYaml .Values.operator.envFrom | nindent 12 }}
env:
{{- toYaml .Values.operator.env | nindent 12 }}
command:
- /manager
args:
Expand Down
9 changes: 9 additions & 0 deletions charts/zora/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ operator:
stacktraceLevel: error
# -- Log time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano')
timeEncoding: rfc3339
# -- List of environment variables to set in operator container. Cannot be updated
env: []
# - name: key
# value: value

# -- List of sources to populate environment variables in operator container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.
envFrom: []
# - configMapRef:
# name: foo

scan:
misconfiguration:
Expand Down
3 changes: 2 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ func main() {

var onClusterUpdate, onClusterDelete saas.ClusterHook
var onClusterScanUpdate, onClusterScanDelete saas.ClusterScanHook
client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyFromEnvironment}}
if saasWorkspaceID != "" {
saasClient, err := saas.NewClient(saasServer, version, saasWorkspaceID, http.DefaultClient)
saasClient, err := saas.NewClient(saasServer, version, saasWorkspaceID, client)
if err != nil {
setupLog.Error(err, "unable to create SaaS client", "workspaceID", saasWorkspaceID)
os.Exit(1)
Expand Down
Loading