Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Wellbore
Wellbore Domain Services
Commits
c7763600
Commit
c7763600
authored
Oct 01, 2021
by
Alexandre Vincent
Browse files
add possibility of autoscaling. add injection of predeploy templates
parent
c60b8ae9
Pipeline
#69886
failed with stages
in 48 seconds
Changes
4
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
devops/azure/chart/templates/deployment.yaml
View file @
c7763600
...
...
@@ -23,7 +23,9 @@ metadata:
name
:
{{
.Values.deployment.name
}}{{
$nameSuffix
}}
{{
include "os-wellbore-ddms.namespace" . | indent 2
}}
spec
:
{{
- if not .Values.isAutoscalingEnabled
}}
replicas
:
{{
.Values.replicaCount
}}
{{
- end
}}
selector
:
matchLabels
:
{{
include "os-wellbore-ddms.commonLabels" . | indent 6
}}
...
...
devops/azure/chart/templates/hpa.yaml
0 → 100644
View file @
c7763600
# Copyright 2021 Schlumberger
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{
- if .Values.isAutoscalingEnabled
}}
apiVersion
:
autoscaling/v2beta2
kind
:
HorizontalPodAutoscaler
metadata
:
name
:
os-wellbore-ddms{{ include "os-wellbore-ddms.name-suffix" . }}
namespace
:
osdu
spec
:
scaleTargetRef
:
apiVersion
:
apps/v1
kind
:
Deployment
name
:
os-wellbore-ddms{{ include "os-wellbore-ddms.name-suffix" . }}
minReplicas
:
{{
.Values.minReplicaCount
}}
maxReplicas
:
{{
.Values.maxReplicaCount
}}
metrics
:
-
type
:
Resource
resource
:
name
:
cpu
target
:
type
:
Utilization
averageUtilization
:
50
behavior
:
scaleDown
:
stabilizationWindowSeconds
:
150
policies
:
-
type
:
Pods
value
:
2
periodSeconds
:
30
scaleUp
:
stabilizationWindowSeconds
:
10
# Either add 50% of current pods or 4 pods (whichever is higher) every 10 seconds until the the HPA stabilizes
selectPolicy
:
Max
policies
:
-
type
:
Pods
value
:
6
periodSeconds
:
10
-
type
:
Percent
value
:
50
periodSeconds
:
10
{{
- end
}}
\ No newline at end of file
devops/azure/chart/values.yaml
View file @
c7763600
...
...
@@ -24,9 +24,11 @@ deployment:
keyvaultUrlPropertyName
:
ENV_KEYVAULT
name
:
os-wellbore-ddms
replicaCount
:
2
nodepool
:
services
isAutoscalingEnabled
:
false
maxReplicaCount
:
2
minReplicaCount
:
2
replicaCount
:
2
resources
:
limits
:
...
...
devops/azure/template/deploy-stages.yaml
View file @
c7763600
...
...
@@ -26,6 +26,10 @@ parameters:
# # TODO: The following templates needs to be injected as parameters
# authenticationTemplate: ${{ getImageTemplate }}
# authenticationTemplateParameters: ${{ getImageTemplateParameters }}
# preDeployTemplates:
# - template: ${{ my_template }}
# parameters: ${{ my_template_parameters }}
# - ...
# getImageTemplate: ${{ authenticationTemplate }}
# getImageTemplateParameters: ${{ authenticationTemplateParameter }}
...
...
@@ -51,6 +55,11 @@ stages:
-
template
:
steps-define-variables.yaml
-
template
:
${{ provider.getImageTemplate }}
parameters
:
${{ provider.getImageTemplateParameters }}
-
${{ each preDeployTemplate in environment.preDeployTemplates }}
:
-
template
:
${{ preDeployTemplate.template }}
parameters
:
${{ each parameter in preDeployTemplate.parameters }}
:
${{ parameter.key }}
:
${{ parameter.value }}
-
template
:
steps-push-image.yaml
parameters
:
azureSubscription
:
$(SERVICE_CONNECTION_NAME)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment