Skip to content

Commit

Permalink
CLOUDP-205482: Remove legacy deployment from AtlasDeployment helm cha…
Browse files Browse the repository at this point in the history
…rt (#269)

Removed legacy deployment from the "atlas-deployment" helm chart
  • Loading branch information
igor-karpukhin authored Jan 10, 2024
1 parent 43e188c commit fb2809a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 113 deletions.
67 changes: 1 addition & 66 deletions charts/atlas-deployment/templates/atlas-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,72 +22,8 @@ spec:
name: {{ include "atlas-deployment.projectfullname" $ }}
{{- if .deploymentSpec }}
deploymentSpec:
name: {{ .deploymentSpec.name }}
providerSettings:
{{- with .deploymentSpec.providerSettings -}}
{{- $provider := .providerName -}}
{{- range $key, $val := . }}
{{ if or (ne $key "backingProviderName") (and (eq $key "backingProviderName") (eq $provider "TENANT" )) }}
{{- $key | indent 2 }}: {{ $val }}
{{- end }}
{{- end }}
{{- toYaml .deploymentSpec | nindent 4 }}
{{- end }}
{{- if .deploymentSpec.autoScaling }}
autoScaling:
{{- with .autoScaling }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- if .autoIndexingEnabled }}
autoIndexingEnabled: false
{{- end }}
{{- if .deploymentSpec.biConnector }}
biConnector:
enabled: {{ .deploymentSpec.biConnector.enabled }}
readPreference: {{ .deploymentSpec.biConnector.readPreference }}
{{- end }}
{{- if .deploymentSpec.clusterType }}
clusterType: {{ .deploymentSpec.clusterType }}
{{- end }}
{{- if .deploymentSpec.diskSizeGB }}
diskSizeGB: {{ .deploymentSpec.diskSizeGB }}
{{- end }}
{{- if .deploymentSpec.encryptionAtRestProvider }}
encryptionAtRestProvider: {{ .deploymentSpec.encryptionAtRestProvider }}
{{- end }}
{{- if .deploymentSpec.labels }}
labels:
{{- with .deploymentSpec.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- if .deploymentSpec.mongoDBMajorVersion }}
mongoDBMajorVersion: {{ .deploymentSpec.mongoDBMajorVersion }}
{{- end }}
{{- if .deploymentSpec.numShards }}
numShards: {{ .deploymentSpec.numShards }}
{{- end }}
{{- if .deploymentSpec.paused }}
paused: {{ .deploymentSpec.paused }}
{{- end }}
{{- if .deploymentSpec.pitEnabled }}
pitEnabled: {{ .deploymentSpec.pitEnabled }}
{{- end }}
{{- if .deploymentSpec.providerBackupEnabled }}
providerBackupEnabled: {{ .deploymentSpec.providerBackupEnabled }}
{{- end }}
{{- if .deploymentSpec.replicationSpecs }}
replicationSpecs:
{{- with .deploymentSpec.replicationSpecs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
{{- if .advancedDeploymentSpec }}
advancedDeploymentSpec:
{{- toYaml .advancedDeploymentSpec | nindent 4}}
{{- end }}
{{- if .serverlessSpec }}
serverlessSpec:
{{- toYaml .serverlessSpec | nindent 4}}
{{- end }}
Expand Down Expand Up @@ -122,4 +58,3 @@ spec:
- name: "NAMESPACE"
value: "{{ $.Release.Namespace }}"
{{- end }}
{{- end }}
98 changes: 51 additions & 47 deletions charts/atlas-deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,70 +36,74 @@ project:
- ipAddress: "0.0.0.0"
comment: "REMOVE ME"

# include either deploymentSpec or advancedDeploymentSpec
# see https://docs.atlas.mongodb.com/reference/api/cluster-advanced/create-one-cluster-advanced/ for
# include either deploymentSpec or serverlessSpec
# see https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Clusters/operation/createCluster for
# options for creating advanced clusters.

deployments:
- deploymentSpec:
name: cluster-name
clusterType: REPLICASET
annotations: {}
# mongodb.com/atlas-resource-policy: keep
providerSettings:
instanceSizeName: M2
providerName: TENANT
backingProviderName: AWS
regionName: US_EAST_1
replicationSpecs:
- zoneName: Zone 1
regionConfigs:
- electableSpecs:
instanceSize: M2
nodeCount: 1
providerName: TENANT
backingProviderName: "AWS"
regionName: US_EAST_1
priority: 7

# Additional clusterSpec values
# Optional section. for more information visit
# https://docs.atlas.mongodb.com/reference/api/clusters-create-one/
# #
# autoScaling:
# autoIndexingEnabled: false
# compute:
# enabled: false
# maxInstanceSize: 'M40'
# minInstanceSize: 'M10'
# scaleDownEnabled: false
# diskGBEnabled: false
# biConnector:
# enabled: false
# readPreference: 'primary'
# clusterType: 'REPLICASET'
# diskSizeGB: '50'
# encryptionAtRestProvider: 'AWS'
# labels:
# mongoDBMajorVersion: '4.4'
# numShards: 2
# paused: false
# pitEnabled: false
# providerBackupEnabled: false
# More advanced, multiregional, multitenant cluster
# deploymentSpec:
# clusterType: GEOSHARDED
# name: advanced-deployment
# replicationSpecs:
# - numShards: 1
# zoneName: Zone1
# regionConfigs:
# - electableSpecs:
# instanceSize: M10
# nodeCount: 3
# providerName: AZURE
# backingProviderName: AZURE
# regionName: EUROPE_NORTH
# priority: 7

# Configure a Serverless Instance
# https://www.mongodb.com/docs/atlas/reference/api/serverless/create-one-serverless-instance/
# - numShards: 1
# zoneName: Zone2
# regionConfigs:
# - electableSpecs:
# instanceSize: M10
# nodeCount: 3
# providerName: AWS
# backingProviderName: AWS
# regionName: US_EAST_1
# priority: 7

# - numShards: 1
# zoneName: Zone3
# regionConfigs:
# - electableSpecs:
# instanceSize: M10
# nodeCount: 3
# providerName: GCP
# backingProviderName: GCP
# regionName: EASTERN_US
# priority: 7

# Configure a Serverless Instance
# https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Serverless-Instances/operation/createServerlessInstance
# - serverlessSpec:
# name: serverless-instance
# providerSettings:
# providerName: SERVERLESS
# backingProviderName: AWS
# regionName: US_EAST_1

# Configure an Advanced Cluster
# https://www.mongodb.com/docs/atlas/reference/api/cluster-advanced/create-one-cluster-advanced/

# - advancedDeploymentSpec:
# clusterType: REPLICASET
# name: advanced-cluster
# replicationSpecs:
# - regionConfigs:
# - electableSpecs:
# instanceSize: M5
# providerName: TENANT
# backingProviderName: AWS
# regionName: US_EAST_1

users:
- username: admin-user
databaseName: admin
Expand Down

0 comments on commit fb2809a

Please sign in to comment.