diff --git a/base/application.yaml b/base/application.yaml deleted file mode 100644 index ae30211fd..000000000 --- a/base/application.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: app.k8s.io/v1beta1 -kind: Application -metadata: - annotations: - apps.open-cluster-management.io/deployables: '' - name: mysql - namespace: mysql -spec: - componentKinds: - - group: apps.open-cluster-management.io - kind: Subscription - descriptor: {} - selector: - matchExpressions: - - key: app - operator: In - values: - - mysql diff --git a/base/deployment.yaml b/base/deployment.yaml index 9f4d3fa30..d3402fc24 100644 --- a/base/deployment.yaml +++ b/base/deployment.yaml @@ -38,6 +38,8 @@ spec: name: db-volume volumes: - name: db-volume + persistentVolumeClaim: + claimName: mysql-pv-claim emptyDir: {} - name: db-init emptyDir: {} diff --git a/base/kustomization.yaml b/base/kustomization.yaml new file mode 100644 index 000000000..d74d3a35d --- /dev/null +++ b/base/kustomization.yaml @@ -0,0 +1,7 @@ +kind: Kustomization + +resources: +- deployment-frontend.yaml +- deployment.yaml +- service.yaml +- service-frontend.yaml diff --git a/base/route-mng.yaml b/base/route-mng.yaml deleted file mode 100644 index 31dd8a901..000000000 --- a/base/route-mng.yaml +++ /dev/null @@ -1,17 +0,0 @@ -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 - diff --git a/base/route.yaml b/base/route.yaml deleted file mode 100644 index eb631804a..000000000 --- a/base/route.yaml +++ /dev/null @@ -1,17 +0,0 @@ -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 - diff --git a/local-cluster/mysql/README b/local-cluster/mysql/README deleted file mode 100644 index 4b9a3313e..000000000 --- a/local-cluster/mysql/README +++ /dev/null @@ -1 +0,0 @@ -this is temp, will be removed, please don't panic diff --git a/local-cluster/mysql/deployment-frontend.yaml b/local-cluster/mysql/deployment-frontend.yaml deleted file mode 100644 index 1ca80cf39..000000000 --- a/local-cluster/mysql/deployment-frontend.yaml +++ /dev/null @@ -1,39 +0,0 @@ -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' ---- diff --git a/local-cluster/mysql/deployment.yaml b/local-cluster/mysql/deployment.yaml deleted file mode 100644 index d60d47cc7..000000000 --- a/local-cluster/mysql/deployment.yaml +++ /dev/null @@ -1,43 +0,0 @@ -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: {} ---- diff --git a/local-cluster/mysql/kustomiation.yaml b/local-cluster/mysql/kustomiation.yaml deleted file mode 100644 index 25cfa50e0..000000000 --- a/local-cluster/mysql/kustomiation.yaml +++ /dev/null @@ -1,4 +0,0 @@ -resources: - #- service.yaml - #- deployment.yaml - #- route.yaml diff --git a/local-cluster/mysql/service-frontend.yaml b/local-cluster/mysql/service-frontend.yaml deleted file mode 100644 index a17af0f8f..000000000 --- a/local-cluster/mysql/service-frontend.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: todonodejs - name: frontend - name: frontend -spec: - ports: - - port: 8080 - selector: - name: frontend diff --git a/local-cluster/mysql/service.yaml b/local-cluster/mysql/service.yaml deleted file mode 100644 index eea7aab03..000000000 --- a/local-cluster/mysql/service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: todonodejs - name: mysql - name: mysql -spec: - ports: - - port: 3306 - selector: - name: mysql diff --git a/local-cluster/subscriptions/mysql/application.yaml b/local-cluster/subscriptions/mysql/application.yaml deleted file mode 100644 index 669bfa982..000000000 --- a/local-cluster/subscriptions/mysql/application.yaml +++ /dev/null @@ -1,9 +0,0 @@ --- - apiVersion: app.k8s.io/v1beta1 - kind: Application - metadata: - name: mysql - spec: - selector: - matchLabels: - app: mysql diff --git a/local-cluster/subscriptions/mysql/namespace.yaml b/local-cluster/subscriptions/mysql/namespace.yaml deleted file mode 100644 index f91b5e884..000000000 --- a/local-cluster/subscriptions/mysql/namespace.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: mysql - diff --git a/local-cluster/subscriptions/mysql/placementrule.yaml b/local-cluster/subscriptions/mysql/placementrule.yaml deleted file mode 100644 index bce2e7058..000000000 --- a/local-cluster/subscriptions/mysql/placementrule.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -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 diff --git a/local-cluster/subscriptions/mysql/subscription.yaml b/local-cluster/subscriptions/mysql/subscription.yaml deleted file mode 100644 index f66661225..000000000 --- a/local-cluster/subscriptions/mysql/subscription.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -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 diff --git a/managed-cluster/mysql/README b/managed-cluster/mysql/README deleted file mode 100644 index 4b9a3313e..000000000 --- a/managed-cluster/mysql/README +++ /dev/null @@ -1 +0,0 @@ -this is temp, will be removed, please don't panic diff --git a/managed-cluster/mysql/kustomiation.yaml b/managed-cluster/mysql/kustomiation.yaml deleted file mode 100644 index 25cfa50e0..000000000 --- a/managed-cluster/mysql/kustomiation.yaml +++ /dev/null @@ -1,4 +0,0 @@ -resources: - #- service.yaml - #- deployment.yaml - #- route.yaml diff --git a/managed-cluster/mysql/prod-deployment-frontend.yaml b/managed-cluster/mysql/prod-deployment-frontend.yaml deleted file mode 100644 index 467cfee8f..000000000 --- a/managed-cluster/mysql/prod-deployment-frontend.yaml +++ /dev/null @@ -1,39 +0,0 @@ -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' ---- diff --git a/managed-cluster/mysql/prod-deployment.yaml b/managed-cluster/mysql/prod-deployment.yaml deleted file mode 100644 index 7bd5308e9..000000000 --- a/managed-cluster/mysql/prod-deployment.yaml +++ /dev/null @@ -1,43 +0,0 @@ -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: {} ---- diff --git a/managed-cluster/mysql/prod-route.yaml b/managed-cluster/mysql/prod-route.yaml deleted file mode 100644 index d03622744..000000000 --- a/managed-cluster/mysql/prod-route.yaml +++ /dev/null @@ -1,17 +0,0 @@ -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 - diff --git a/managed-cluster/mysql/prod-service-frontend.yaml b/managed-cluster/mysql/prod-service-frontend.yaml deleted file mode 100644 index 69a7f831b..000000000 --- a/managed-cluster/mysql/prod-service-frontend.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: todonodejs - name: frontend - name: frontend-prod -spec: - ports: - - port: 8080 - selector: - name: frontend-prod diff --git a/managed-cluster/mysql/prod-service.yaml b/managed-cluster/mysql/prod-service.yaml deleted file mode 100644 index 216949510..000000000 --- a/managed-cluster/mysql/prod-service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: todonodejs - name: mysql - name: mysql-prod -spec: - ports: - - port: 3306 - selector: - name: mysql-prod diff --git a/managed-cluster/subscriptions/mysql/application.yaml b/managed-cluster/subscriptions/mysql/application.yaml deleted file mode 100644 index 669bfa982..000000000 --- a/managed-cluster/subscriptions/mysql/application.yaml +++ /dev/null @@ -1,9 +0,0 @@ --- - apiVersion: app.k8s.io/v1beta1 - kind: Application - metadata: - name: mysql - spec: - selector: - matchLabels: - app: mysql diff --git a/managed-cluster/subscriptions/mysql/namespace.yaml b/managed-cluster/subscriptions/mysql/namespace.yaml deleted file mode 100644 index f91b5e884..000000000 --- a/managed-cluster/subscriptions/mysql/namespace.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: mysql - diff --git a/managed-cluster/subscriptions/mysql/placementrule.yaml b/managed-cluster/subscriptions/mysql/placementrule.yaml deleted file mode 100644 index bce2e7058..000000000 --- a/managed-cluster/subscriptions/mysql/placementrule.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -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 diff --git a/managed-cluster/subscriptions/mysql/subscription.yaml b/managed-cluster/subscriptions/mysql/subscription.yaml deleted file mode 100644 index f66661225..000000000 --- a/managed-cluster/subscriptions/mysql/subscription.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -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 diff --git a/mysql/README b/mysql/README deleted file mode 100644 index 4b9a3313e..000000000 --- a/mysql/README +++ /dev/null @@ -1 +0,0 @@ -this is temp, will be removed, please don't panic diff --git a/mysql/application.yaml b/mysql/application.yaml deleted file mode 100644 index ae30211fd..000000000 --- a/mysql/application.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: app.k8s.io/v1beta1 -kind: Application -metadata: - annotations: - apps.open-cluster-management.io/deployables: '' - name: mysql - namespace: mysql -spec: - componentKinds: - - group: apps.open-cluster-management.io - kind: Subscription - descriptor: {} - selector: - matchExpressions: - - key: app - operator: In - values: - - mysql diff --git a/mysql/deployment-frontend.yaml b/mysql/deployment-frontend.yaml deleted file mode 100644 index 1ca80cf39..000000000 --- a/mysql/deployment-frontend.yaml +++ /dev/null @@ -1,39 +0,0 @@ -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' ---- diff --git a/mysql/deployment.yaml b/mysql/deployment.yaml deleted file mode 100644 index 197d84c21..000000000 --- a/mysql/deployment.yaml +++ /dev/null @@ -1,43 +0,0 @@ ---- -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-152 - 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: {} diff --git a/mysql/kustomization.yaml b/mysql/kustomization.yaml deleted file mode 100644 index 9418e9328..000000000 --- a/mysql/kustomization.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - subscription.yaml - - application.yaml - - deployment-frontend.yaml - - deployment.yaml - - service.yaml - - service-frontend.yaml - - route-mng.yaml \ No newline at end of file diff --git a/mysql/overlays/development/kustomization.yaml b/mysql/overlays/development/kustomization.yaml deleted file mode 100644 index 82a96f4c1..000000000 --- a/mysql/overlays/development/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: - - ../../base - -resources: - - dbclaim-pvc.yaml diff --git a/mysql/overlays/production/kustomization.yaml b/mysql/overlays/production/kustomization.yaml deleted file mode 100644 index 3916ef7fd..000000000 --- a/mysql/overlays/production/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: - - ../../base - -resources: - - dbclaim-pvc.yaml - -replicas: -- name: mysql - count: 3 diff --git a/mysql/placementrule.yaml b/mysql/placementrule.yaml deleted file mode 100644 index fccfcc3f5..000000000 --- a/mysql/placementrule.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule -metadata: - labels: - app: mysql - name: mysql-placement-2 - namespace: mysql -spec: - clusterSelector: - matchLabels: - 'managed-cluster': 'true' ---- diff --git a/mysql/service-frontend.yaml b/mysql/service-frontend.yaml deleted file mode 100644 index a17af0f8f..000000000 --- a/mysql/service-frontend.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: todonodejs - name: frontend - name: frontend -spec: - ports: - - port: 8080 - selector: - name: frontend diff --git a/mysql/service.yaml b/mysql/service.yaml deleted file mode 100644 index eea7aab03..000000000 --- a/mysql/service.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: todonodejs - name: mysql - name: mysql -spec: - ports: - - port: 3306 - selector: - name: mysql diff --git a/mysql/subscription.yaml b/mysql/subscription.yaml deleted file mode 100644 index 5cf70767d..000000000 --- a/mysql/subscription.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: apps.open-cluster-management.io/v1 -kind: Subscription -metadata: - annotations: - apps.open-cluster-management.io/deployables: 'mysql/mysql-subscription-2-mysql-frontend-route,mysql/mysql-subscription-2-mysql-frontend-service,mysql/mysql-subscription-2-mysql-mysql-service,mysql/mysql-subscription-2-mysql-frontend-deployment,mysql/mysql-subscription-2-mysql-mysql-deployment' - apps.open-cluster-management.io/git-branch: production - apps.open-cluster-management.io/git-path: mysql - apps.open-cluster-management.io/reconcile-option: merge - labels: - app: mysql - app.kubernetes.io/part-of: mysql - apps.open-cluster-management.io/reconcile-rate: medium - name: mysql-subscription-2 - namespace: mysql -spec: - channel: ggithubcom-mjarrett0-do480-apps-ns/ggithubcom-mjarrett0-do480-apps - placement: - placementRef: - kind: PlacementRule - name: mysql-placement-2 - ---- -apiVersion: apps.open-cluster-management.io/v1 -kind: PlacementRule -metadata: - annotations: {} - labels: - app: mysql - name: mysql-placement-2 - namespace: mysql -spec: - clusterSelector: - matchLabels: - env: production diff --git a/mysql/overlays/development/dbclaim-pvc.yaml b/overlays/development/dbclaim-pvc.yaml similarity index 91% rename from mysql/overlays/development/dbclaim-pvc.yaml rename to overlays/development/dbclaim-pvc.yaml index a227a5b16..8ef66e9d6 100644 --- a/mysql/overlays/development/dbclaim-pvc.yaml +++ b/overlays/development/dbclaim-pvc.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: mysql-pv-claim - namespace: mysql spec: accessModes: - ReadWriteOnce diff --git a/overlays/development/kustomization.yaml b/overlays/development/kustomization.yaml new file mode 100644 index 000000000..0eedb036e --- /dev/null +++ b/overlays/development/kustomization.yaml @@ -0,0 +1,10 @@ +kind: Kustomization + +bases: + - ../../base + +resources: +- dbclaim-pvc.yaml +- route.yaml +namePrefix: dev- + diff --git a/local-cluster/mysql/route.yaml b/overlays/development/route.yaml similarity index 84% rename from local-cluster/mysql/route.yaml rename to overlays/development/route.yaml index 25041a05c..c08d9f74f 100644 --- a/local-cluster/mysql/route.yaml +++ b/overlays/development/route.yaml @@ -3,15 +3,13 @@ kind: Route metadata: labels: app: todonodejs - name: route-frontend + name: frontend name: frontend - namespace: mysql spec: host: todo.apps.ocp4.example.com path: "/todo" to: kind: Service - name: frontend + name: dev-frontend weight: 100 wildcardPolicy: None - diff --git a/mysql/overlays/production/dbclaim-pvc.yaml b/overlays/production/dbclaim-pvc.yaml similarity index 81% rename from mysql/overlays/production/dbclaim-pvc.yaml rename to overlays/production/dbclaim-pvc.yaml index 12422f6b6..c1e320262 100644 --- a/mysql/overlays/production/dbclaim-pvc.yaml +++ b/overlays/production/dbclaim-pvc.yaml @@ -2,11 +2,10 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: mysql-pv-claim - namespace: mysql spec: accessModes: - ReadWriteOnce resources: requests: - storage: 10Mi + storage: 50Mi storageClassName: nfs-storage diff --git a/overlays/production/kustomization.yaml b/overlays/production/kustomization.yaml new file mode 100644 index 000000000..dc012d995 --- /dev/null +++ b/overlays/production/kustomization.yaml @@ -0,0 +1,10 @@ +kind: Kustomization + +bases: + - ../../base + +resources: +- dbclaim-pvc.yaml +- route.yaml +namePrefix: prod- + diff --git a/mysql/route.yaml b/overlays/production/route.yaml similarity index 84% rename from mysql/route.yaml rename to overlays/production/route.yaml index d8193bc74..09fc7987a 100644 --- a/mysql/route.yaml +++ b/overlays/production/route.yaml @@ -3,14 +3,13 @@ kind: Route metadata: labels: app: todonodejs - name: route-frontend + name: frontend name: frontend - namespace: mysql spec: host: todo.apps.ocp4-mng.example.com path: "/todo" to: kind: Service - name: frontend + name: prod-frontend weight: 100 wildcardPolicy: None diff --git a/subscriptions/mysql/application.yaml b/subscriptions/mysql/application.yaml deleted file mode 100644 index 669bfa982..000000000 --- a/subscriptions/mysql/application.yaml +++ /dev/null @@ -1,9 +0,0 @@ --- - apiVersion: app.k8s.io/v1beta1 - kind: Application - metadata: - name: mysql - spec: - selector: - matchLabels: - app: mysql diff --git a/subscriptions/mysql/namespace.yaml b/subscriptions/mysql/namespace.yaml deleted file mode 100644 index f91b5e884..000000000 --- a/subscriptions/mysql/namespace.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: mysql - diff --git a/subscriptions/mysql/placementrule.yaml b/subscriptions/mysql/placementrule.yaml deleted file mode 100644 index 5d1caf584..000000000 --- a/subscriptions/mysql/placementrule.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -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 diff --git a/subscriptions/mysql/subscription.yaml b/subscriptions/mysql/subscription.yaml deleted file mode 100644 index f66661225..000000000 --- a/subscriptions/mysql/subscription.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -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