Skip to content

Commit

Permalink
Bug fixes: job image and scale down
Browse files Browse the repository at this point in the history
  • Loading branch information
henrod committed Jun 12, 2017
1 parent a6800fd commit 534c02d
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 9 deletions.
2 changes: 1 addition & 1 deletion helm/charts/maestro-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: maestro-api
home: https://github.com/topfreegames/maestro
description: Maestro
version: 2.3.1
version: 2.3.2
maintainers:
- name: TFGCo
email: backend@tfgco.com
21 changes: 21 additions & 0 deletions helm/charts/maestro-db-config/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
7 changes: 7 additions & 0 deletions helm/charts/maestro-db-config/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: maestro-db-config
home: https://github.com/topfreegames/maestro
description: Configre Maestro databse
version: 2.3.2
maintainers:
- name: TFGCo
email: backend@tfgco.com
34 changes: 34 additions & 0 deletions helm/charts/maestro-db-config/templates/maestro-db-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: batch/v1
kind: Job
metadata:
name: pg-config
labels:
name: pg-config
heritage: pg-config
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-weight": "3"
spec:
template:
metadata:
name: pg-config
labels:
name: pg-config
spec:
restartPolicy: OnFailure
containers:
- name: pg-config
image: quay.io/tfgco/maestro:v{{ .Chart.Version }}
env:
- name: MAESTRO_EXTENSIONS_PG_HOST
value: {{ .Values.postgres_host }}
- name: MAESTRO_EXTENSIONS_PG_PORT
value: "{{ .Values.postgres_port }}"
- name: MAESTRO_EXTENSIONS_PG_USER
value: {{ .Values.postgres_user }}
- name: MAESTRO_EXTENSIONS_PG_PASS
value: {{ .Values.postgres_password }}
- name: MAESTRO_EXTENSIONS_PG_DATABASE
value: {{ .Values.postgres_database }}
- name: MAESTRO_RUN_SETUP
value: "true"
4 changes: 4 additions & 0 deletions helm/charts/maestro-db-config/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
postgres_host: maestro-postgres
postgres_port: "5432"
postgres_user: maestro
postgres_database: maestro
2 changes: 1 addition & 1 deletion helm/charts/maestro-postgres/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
labels:
name: pg-config
spec:
restartPolicy: Always
restartPolicy: OnFailure
containers:
- name: pg-config
image: quay.io/tfgco/maestro:v{{ .Chart.Version }}
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/maestro-worker/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: maestro-worker
home: https://github.com/topfreegames/maestro
description: Maestro
version: 2.3.1
version: 2.3.2
maintainers:
- name: TFGCo
email: backend@tfgco.com
2 changes: 1 addition & 1 deletion helm/charts/maestro/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: maestro
home: https://github.com/topfreegames/maestro
description: Maestro
version: 0.1.4
version: 0.1.5
maintainers:
- name: TFGCo
email: backend@tfgco.com
7 changes: 5 additions & 2 deletions helm/charts/maestro/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ dependencies:
version: 0.1.0
repository: http://helm.tfgco.com
- name: maestro-api
version: 2.3.1
version: 2.3.2
repository: http://helm.tfgco.com
- name: maestro-worker
version: 2.3.1
version: 2.3.2
repository: http://helm.tfgco.com
- name: maestro-db-config
version: 2.3.2
repository: http://helm.tfgco.com
2 changes: 1 addition & 1 deletion metadata/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
package metadata

//Version of Maestro
var Version = "1.0.0"
var Version = "2.3.2"

//KubeVersion is the desired Kubernetes version
var KubeVersion = "v1.6.4"
2 changes: 1 addition & 1 deletion watcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (w *Watcher) AutoScale() {
w.RedisClient.Client,
w.KubernetesClient,
scheduler,
autoScalingInfo.Up.Delta,
autoScalingInfo.Down.Delta,
timeoutSec,
)
scheduler.State = models.StateInSync
Expand Down
2 changes: 1 addition & 1 deletion watcher/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ var _ = Describe("Watcher", func() {
err = controller.ScaleUp(logger, mr, mockDb, mockRedisClient, clientset, scheduler, scaleUpAmount, timeoutSec, true)

// ScaleDown
scaleDownAmount := 2
scaleDownAmount := configYaml1.AutoScaling.Down.Delta
names, err := controller.GetServiceNames(scaleDownAmount, scheduler.Name, clientset)
Expect(err).NotTo(HaveOccurred())
mockRedisClient.EXPECT().
Expand Down

0 comments on commit 534c02d

Please sign in to comment.