-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
score/deployment: Adding check for the Deployment replicas to be >=2 …
…if not HPA managed and targeted by Service Fixes #569 Signed-off-by: BigGold1310 <cyrill.naef@gmail.com>
- Loading branch information
1 parent
8f4d9fa
commit 8e178b1
Showing
6 changed files
with
154 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: autoscaling/v1 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: php-apache | ||
namespace: default | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: php-apache | ||
minReplicas: 1 | ||
maxReplicas: 10 | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 50 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: php-apache | ||
namespace: default | ||
spec: | ||
replicas: 1 | ||
template: | ||
spec: | ||
containers: | ||
- name: foo | ||
image: foo:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: deployment-test-1 | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: my-app | ||
spec: | ||
containers: | ||
- name: foobar | ||
image: foo/bar:123 | ||
replicas: 1 | ||
strategy: | ||
type: RollingUpdate | ||
--- | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: my-service | ||
spec: | ||
selector: | ||
app: my-app | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ spec: | |
containers: | ||
- name: foobar | ||
image: foo/bar:123 | ||
replicas: 2 | ||
strategy: | ||
type: RollingUpdate | ||
--- | ||
|