forked from RedHatTraining/DO480-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into main-kustomize
- Loading branch information
Showing
31 changed files
with
479 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,4 @@ spec: | |
- name: db-init | ||
emptyDir: {} | ||
--- | ||
|
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,17 @@ | ||
apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: route-frontend-mng | ||
name: frontend-mng | ||
namespace: mysql | ||
spec: | ||
host: todo.apps.ocp4-mng.example.com | ||
path: "/todo/" | ||
to: | ||
kind: Service | ||
name: frontend | ||
weight: 100 | ||
wildcardPolicy: None | ||
|
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 @@ | ||
this is temp, will be removed, please don't panic |
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,39 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: frontend | ||
labels: | ||
app: todonodejs | ||
name: frontend | ||
namespace: mysql | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: todonodejs | ||
name: frontend | ||
template: | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: frontend | ||
spec: | ||
containers: | ||
- resources: | ||
limits: | ||
cpu: '0.5' | ||
image: quay.io/redhattraining/todo-single:v1.0 | ||
name: todonodejs | ||
ports: | ||
- containerPort: 8080 | ||
name: nodejs-http | ||
env: | ||
- name: MYSQL_ENV_MYSQL_DATABASE | ||
value: items | ||
- name: MYSQL_ENV_MYSQL_USER | ||
value: user1 | ||
- name: MYSQL_ENV_MYSQL_PASSWORD | ||
value: mypa55 | ||
- name: APP_PORT | ||
value: '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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mysql | ||
labels: | ||
app: todonodejs | ||
name: mysql | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: todonodejs | ||
name: mysql | ||
template: | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: mysql | ||
spec: | ||
containers: | ||
- image: registry.redhat.io/rhel8/mysql-80:1-156 | ||
name: mysql | ||
env: | ||
- name: MYSQL_ROOT_PASSWORD | ||
value: r00tpa55 | ||
- name: MYSQL_USER | ||
value: user1 | ||
- name: MYSQL_PASSWORD | ||
value: mypa55 | ||
- name: MYSQL_DATABASE | ||
value: items | ||
ports: | ||
- containerPort: 3306 | ||
name: mysql | ||
volumeMounts: | ||
- mountPath: "/var/lib/mysql" | ||
name: db-volume | ||
volumes: | ||
- name: db-volume | ||
emptyDir: {} | ||
- name: db-init | ||
emptyDir: {} | ||
--- |
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,4 @@ | ||
resources: | ||
#- service.yaml | ||
#- deployment.yaml | ||
#- route.yaml |
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,17 @@ | ||
apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: route-frontend | ||
name: frontend | ||
namespace: mysql | ||
spec: | ||
host: todo.apps.ocp4.example.com | ||
path: "/todo" | ||
to: | ||
kind: Service | ||
name: frontend | ||
weight: 100 | ||
wildcardPolicy: None | ||
|
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,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: frontend | ||
name: frontend | ||
spec: | ||
ports: | ||
- port: 8080 | ||
selector: | ||
name: frontend |
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,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: mysql | ||
name: mysql | ||
spec: | ||
ports: | ||
- port: 3306 | ||
selector: | ||
name: mysql |
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,9 @@ | ||
-- | ||
apiVersion: app.k8s.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: mysql | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: mysql |
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,6 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: mysql | ||
|
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,31 @@ | ||
--- | ||
apiVersion: apps.open-cluster-management.io/v1 | ||
kind: PlacementRule | ||
metadata: | ||
name: mysql-development | ||
labels: | ||
app: mysql | ||
spec: | ||
clusterConditions: | ||
- type: ManagedClusterConditionAvailable | ||
status: "True" | ||
clusterSelector: | ||
matchLabels: | ||
usage: development | ||
#clusterReplicas: 1 #Apply to how many matched clusters, default is ALL | ||
--- | ||
apiVersion: apps.open-cluster-management.io/v1 | ||
kind: PlacementRule | ||
metadata: | ||
name: mysql-production | ||
namespace: mysql | ||
labels: | ||
app: mysql | ||
spec: | ||
clusterConditions: | ||
- type: ManagedClusterConditionAvailable | ||
status: "True" | ||
clusterSelector: | ||
matchLabels: | ||
usage: production | ||
#clusterReplicas: 1 #Apply to how many matched clusters, default is ALL |
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,33 @@ | ||
--- | ||
apiVersion: apps.open-cluster-management.io/v1 | ||
kind: Subscription | ||
metadata: | ||
name: mysql-development-subscription | ||
labels: | ||
app: mysql | ||
annotations: | ||
apps.open-cluster-management.io/github-path: mysql | ||
apps.open-cluster-management.io/github-branch: main | ||
spec: | ||
channel: application/gitops | ||
placement: | ||
placementRef: | ||
name: mysql-development | ||
kind: PlacementRule | ||
--- | ||
apiVersion: apps.open-cluster-management.io/v1 | ||
kind: Subscription | ||
metadata: | ||
name: mysql-production-subscription | ||
namespace: mysql | ||
labels: | ||
app: mysql | ||
annotations: | ||
apps.open-cluster-management.io/github-path: mysql | ||
apps.open-cluster-management.io/github-branch: production | ||
spec: | ||
channel: application/gitops | ||
placement: | ||
placementRef: | ||
name: mysql-production | ||
kind: PlacementRule |
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 @@ | ||
this is temp, will be removed, please don't panic |
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,4 @@ | ||
resources: | ||
#- service.yaml | ||
#- deployment.yaml | ||
#- route.yaml |
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,39 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: frontend-prod | ||
labels: | ||
app: todonodejs | ||
name: frontend | ||
namespace: mysql | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: todonodejs | ||
name: frontend | ||
template: | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: frontend | ||
spec: | ||
containers: | ||
- resources: | ||
limits: | ||
cpu: '0.5' | ||
image: quay.io/redhattraining/todo-single:v1.0 | ||
name: todonodejs | ||
ports: | ||
- containerPort: 8080 | ||
name: nodejs-http | ||
env: | ||
- name: MYSQL_ENV_MYSQL_DATABASE | ||
value: items | ||
- name: MYSQL_ENV_MYSQL_USER | ||
value: user1 | ||
- name: MYSQL_ENV_MYSQL_PASSWORD | ||
value: mypa55 | ||
- name: APP_PORT | ||
value: '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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mysql-prod | ||
labels: | ||
app: todonodejs | ||
name: mysql | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: todonodejs | ||
name: mysql | ||
template: | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: mysql | ||
spec: | ||
containers: | ||
- image: registry.redhat.io/rhel8/mysql-80:1-156 | ||
name: mysql | ||
env: | ||
- name: MYSQL_ROOT_PASSWORD | ||
value: r00tpa55 | ||
- name: MYSQL_USER | ||
value: user1 | ||
- name: MYSQL_PASSWORD | ||
value: mypa55 | ||
- name: MYSQL_DATABASE | ||
value: items | ||
ports: | ||
- containerPort: 3306 | ||
name: mysql | ||
volumeMounts: | ||
- mountPath: "/var/lib/mysql" | ||
name: db-volume | ||
volumes: | ||
- name: db-volume | ||
emptyDir: {} | ||
- name: db-init | ||
emptyDir: {} | ||
--- |
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,17 @@ | ||
apiVersion: route.openshift.io/v1 | ||
kind: Route | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: route-frontend | ||
name: frontend-prod | ||
namespace: mysql | ||
spec: | ||
host: todo.apps.ocp4-mng.example.com | ||
path: "/todo" | ||
to: | ||
kind: Service | ||
name: frontend-prod | ||
weight: 100 | ||
wildcardPolicy: None | ||
|
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,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: frontend | ||
name: frontend-prod | ||
spec: | ||
ports: | ||
- port: 8080 | ||
selector: | ||
name: frontend-prod |
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,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app: todonodejs | ||
name: mysql | ||
name: mysql-prod | ||
spec: | ||
ports: | ||
- port: 3306 | ||
selector: | ||
name: mysql-prod |
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,9 @@ | ||
-- | ||
apiVersion: app.k8s.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: mysql | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: mysql |
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,6 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: mysql | ||
|
Oops, something went wrong.