Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions charts/oci-pivot-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ spec:
{{- if .Values.oci.compartmentId }}
- --compartment-id={{ .Values.oci.compartmentId }}
{{- end }}
{{- with .Values.extraEnvFrom }}
envFrom:
{{- toYaml . | nindent 12 }}
{{- end }}
livenessProbe:
httpGet:
path: /healthz
Expand Down
9 changes: 9 additions & 0 deletions charts/oci-pivot-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,19 @@ replicaCount: 1
oci:
# OCI compartment OCID used when creating secondary private IPs and reserved public IPs.
# Can be overridden per-resource via PivotIP.spec.compartmentId.
# Prefer extraEnvFrom + OCI_COMPARTMENT_ID over this when the value
# shouldn't be a plain Helm value (e.g. sourced from an External Secret).
compartmentId: ""

leaderElect: false

# Extra envFrom entries on the manager container, e.g. to source
# OCI_COMPARTMENT_ID from a Secret instead of oci.compartmentId above:
# extraEnvFrom:
# - secretRef:
# name: oci-pivot-controller-config
extraEnvFrom: []

resources:
requests:
cpu: 100m
Expand Down
6 changes: 4 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ func main() {
flag.StringVar(&metricsCertKey, "metrics-cert-key", "tls.key", "The name of the metrics server key file.")
flag.BoolVar(&enableHTTP2, "enable-http2", false,
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
flag.StringVar(&compartmentID, "compartment-id", "",
flag.StringVar(&compartmentID, "compartment-id", os.Getenv("OCI_COMPARTMENT_ID"),
"OCI compartment OCID used when creating secondary private IPs and reserved public IPs. "+
"Can be overridden per-resource via PivotIP.spec.compartmentId.")
"Can be overridden per-resource via PivotIP.spec.compartmentId. Falls back to the "+
"OCI_COMPARTMENT_ID env var when unset, so it can be sourced from a Secret rather "+
"than a Helm value.")
opts := zap.Options{
Development: true,
}
Expand Down
Loading