Skip to content

Commit

Permalink
Azure & GCP integration: handle Azure & GCP configuration input to cr…
Browse files Browse the repository at this point in the history
…edentials & intents operator (#175)

Co-authored-by: davidrobert <[email protected]>
  • Loading branch information
amitlicht and otterobert authored Mar 5, 2024
1 parent 4c7109a commit 8bbad15
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
6 changes: 3 additions & 3 deletions credentials-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
| `global.aws.enabled` | Enable or disable AWS integration | `false` |
| `global.aws.eksClusterNameOverride` | EKS cluster name (overrides auto-detection) | `(none)` |
| `global.azure.enabled` | Enable or disable Azure integration | `false` |
| `global.aws.useSoftDelete` | Use soft delete strategy (tag as deleted instead of actually delete) for AWS roles and policies | `false` |
| `global.aws.useSoftDelete` | Use soft delete strategy (tag as deleted instead of actually delete) for AWS roles and policies | `false` |
| `global.gcp.enabled` | Enable or disable GCPs integration | `false` |
| `global.telemetry.enabled` | If set to `false`, all anonymous telemetries collection will be disabled | `true` |
| `global.telemetry.usage.enabled` | If set to `false`, collection of anonymous telemetries on product usage will be disabled | `true` |
| `global.telemetry.errors.enabled` | If set to `false`, collection of anonymous telemetries on application crashes and errors will be disabled | `true` |
Expand Down Expand Up @@ -67,8 +68,7 @@
| `aws.roleARN` | ARN of the AWS role the operator will use to access AWS. | `(none)` |
| `global.aws.enabled` | Enable or disable AWS integration | `false` |
| `global.aws.eksClusterNameOverride` | EKS cluster name (overrides auto-detection) | `(none)` |
| `global.aws.useSoftDelete` | Use soft delete strategy (tag as deleted instead of actually delete) for AWS roles and policies | `false` |

| `global.aws.useSoftDelete` | Use soft delete strategy (tag as deleted instead of actually delete) for AWS roles and policies | `false` |

## Azure integration parameters
| Key | Description | Default |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ spec:
{{ if eq true .Values.global.aws.enabled }}
- --enable-aws-serviceaccount-management=true
{{ end }}
{{ if eq true .Values.global.azure.enabled }}
- --enable-azure-serviceaccount-management=true
- --azure-subscription-id={{ required "You must specify the Azure subscription ID." .Values.azure.subscriptionID | quote }}
- --azure-resource-group={{ required "You must specify the Azure resource group." .Values.azure.resourceGroup | quote }}
- --azure-aks-cluster-name={{ required "You must specify the Azure AKS cluster name." .Values.azure.aksClusterName | quote }}
{{ end }}
{{ if eq true .Values.global.gcp.enabled }}
- --enable-gcp-serviceaccount-management=true
{{ end }}
- --leader-elect
command:
- /manager
Expand Down
6 changes: 6 additions & 0 deletions credentials-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ aws:

azure:
userAssignedIdentityID:
subscriptionID:
resourceGroup:
aksClusterName:

global:
# Extra annotations for deployed pods
Expand All @@ -49,6 +52,9 @@ global:
azure:
enabled: false

gcp:
enabled: false

# Specify an annotation name that by setting it, one can override otterize's service name resolution.
serviceNameOverrideAnnotationName: intents.otterize.com/service-name
telemetry:
Expand Down
1 change: 1 addition & 0 deletions intents-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
| `global.aws.enabled` | Enable or disable AWS integration | `false` |
| `global.aws.eksClusterNameOverride` | EKS cluster name (overrides auto-detection) | `(none)` |
| `global.azure.enabled` | Enable or disable Azure integration | `false` |
| `global.gcp.enabled` | Enable or disable GCP integration | `false` |

## Operator parameters
| Key | Description | Default |
Expand Down
10 changes: 7 additions & 3 deletions intents-operator/templates/intents-operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,22 @@ spec:
{{ end }}
- name: OTTERIZE_ENABLE_AZURE_IAM_POLICY
value: {{ .Values.global.azure.enabled | quote }}
{{ if .Values.global.azure.enabled }}
{{ if .Values.azure.subscriptionID }}
- name: OTTERIZE_AZURE_SUBSCRIPTION_ID
value: {{ .Values.azure.subscriptionID | quote }}
value: {{ required "You must specify the Azure subscription ID." .Values.azure.subscriptionID | quote }}
{{ end }}
{{ if .Values.azure.resourceGroup }}
- name: OTTERIZE_AZURE_RESOURCE_GROUP
value: {{ .Values.azure.resourceGroup | quote }}
value: {{ required "You must specify the Azure resource group." .Values.azure.resourceGroup | quote }}
{{ end }}
{{ if .Values.azure.aksClusterName }}
- name: OTTERIZE_AZURE_AKS_CLUSTER_NAME
value: {{ .Values.azure.aksClusterName | quote }}
value: {{ required "You must specify the AKS cluster name." .Values.azure.aksClusterName | quote }}
{{ end }}
{{ end }}
- name: OTTERIZE_ENABLE_GCP_IAM_POLICY
value: {{ .Values.global.gcp.enabled | quote }}
{{- if .Values.global.telemetry.errors.stage }}
- name: OTTERIZE_TELEMETRY_ERRORS_STAGE
value: {{ .Values.global.telemetry.errors.stage | quote }}
Expand Down
3 changes: 3 additions & 0 deletions intents-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ global:
azure:
enabled: false

gcp:
enabled: false

# Extra annotations for deployed pods
podAnnotations: {}
# Extra labels for deployed pods
Expand Down

0 comments on commit 8bbad15

Please sign in to comment.