From d6e9a9dfe8cf2a43820885f19b68ed510165b4d0 Mon Sep 17 00:00:00 2001 From: Michael Jarrett Date: Thu, 19 May 2022 08:22:46 -0400 Subject: [PATCH 01/11] update --- local-cluster/mysql/README | 1 - local-cluster/mysql/deployment-frontend.yaml | 39 ----------------- local-cluster/mysql/deployment.yaml | 43 ------------------- local-cluster/mysql/kustomiation.yaml | 4 -- local-cluster/mysql/route.yaml | 17 -------- local-cluster/mysql/service-frontend.yaml | 12 ------ local-cluster/mysql/service.yaml | 12 ------ .../subscriptions/mysql/application.yaml | 9 ---- .../subscriptions/mysql/namespace.yaml | 6 --- .../subscriptions/mysql/placementrule.yaml | 31 ------------- .../subscriptions/mysql/subscription.yaml | 33 -------------- managed-cluster/mysql/README | 1 - managed-cluster/mysql/kustomiation.yaml | 4 -- .../mysql/prod-deployment-frontend.yaml | 39 ----------------- managed-cluster/mysql/prod-deployment.yaml | 43 ------------------- managed-cluster/mysql/prod-route.yaml | 17 -------- .../mysql/prod-service-frontend.yaml | 12 ------ managed-cluster/mysql/prod-service.yaml | 12 ------ .../subscriptions/mysql/application.yaml | 9 ---- .../subscriptions/mysql/namespace.yaml | 6 --- .../subscriptions/mysql/placementrule.yaml | 31 ------------- .../subscriptions/mysql/subscription.yaml | 33 -------------- mysql/README | 1 - mysql/application.yaml | 18 -------- mysql/deployment-frontend.yaml | 39 ----------------- mysql/deployment.yaml | 43 ------------------- mysql/kustomization.yaml | 11 ----- mysql/overlays/development/dbclaim-pvc.yaml | 12 ------ mysql/overlays/development/kustomization.yaml | 8 ---- mysql/overlays/production/dbclaim-pvc.yaml | 12 ------ mysql/overlays/production/kustomization.yaml | 12 ------ mysql/placementrule.yaml | 13 ------ mysql/route.yaml | 16 ------- mysql/service-frontend.yaml | 12 ------ mysql/service.yaml | 12 ------ mysql/subscription.yaml | 34 --------------- subscriptions/mysql/application.yaml | 9 ---- subscriptions/mysql/namespace.yaml | 6 --- subscriptions/mysql/placementrule.yaml | 16 ------- subscriptions/mysql/subscription.yaml | 33 -------------- 40 files changed, 721 deletions(-) delete mode 100644 local-cluster/mysql/README delete mode 100644 local-cluster/mysql/deployment-frontend.yaml delete mode 100644 local-cluster/mysql/deployment.yaml delete mode 100644 local-cluster/mysql/kustomiation.yaml delete mode 100644 local-cluster/mysql/route.yaml delete mode 100644 local-cluster/mysql/service-frontend.yaml delete mode 100644 local-cluster/mysql/service.yaml delete mode 100644 local-cluster/subscriptions/mysql/application.yaml delete mode 100644 local-cluster/subscriptions/mysql/namespace.yaml delete mode 100644 local-cluster/subscriptions/mysql/placementrule.yaml delete mode 100644 local-cluster/subscriptions/mysql/subscription.yaml delete mode 100644 managed-cluster/mysql/README delete mode 100644 managed-cluster/mysql/kustomiation.yaml delete mode 100644 managed-cluster/mysql/prod-deployment-frontend.yaml delete mode 100644 managed-cluster/mysql/prod-deployment.yaml delete mode 100644 managed-cluster/mysql/prod-route.yaml delete mode 100644 managed-cluster/mysql/prod-service-frontend.yaml delete mode 100644 managed-cluster/mysql/prod-service.yaml delete mode 100644 managed-cluster/subscriptions/mysql/application.yaml delete mode 100644 managed-cluster/subscriptions/mysql/namespace.yaml delete mode 100644 managed-cluster/subscriptions/mysql/placementrule.yaml delete mode 100644 managed-cluster/subscriptions/mysql/subscription.yaml delete mode 100644 mysql/README delete mode 100644 mysql/application.yaml delete mode 100644 mysql/deployment-frontend.yaml delete mode 100644 mysql/deployment.yaml delete mode 100644 mysql/kustomization.yaml delete mode 100644 mysql/overlays/development/dbclaim-pvc.yaml delete mode 100644 mysql/overlays/development/kustomization.yaml delete mode 100644 mysql/overlays/production/dbclaim-pvc.yaml delete mode 100644 mysql/overlays/production/kustomization.yaml delete mode 100644 mysql/placementrule.yaml delete mode 100644 mysql/route.yaml delete mode 100644 mysql/service-frontend.yaml delete mode 100644 mysql/service.yaml delete mode 100644 mysql/subscription.yaml delete mode 100644 subscriptions/mysql/application.yaml delete mode 100644 subscriptions/mysql/namespace.yaml delete mode 100644 subscriptions/mysql/placementrule.yaml delete mode 100644 subscriptions/mysql/subscription.yaml 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/route.yaml b/local-cluster/mysql/route.yaml deleted file mode 100644 index 25041a05c..000000000 --- a/local-cluster/mysql/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/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/dbclaim-pvc.yaml b/mysql/overlays/development/dbclaim-pvc.yaml deleted file mode 100644 index a227a5b16..000000000 --- a/mysql/overlays/development/dbclaim-pvc.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: mysql-pv-claim - namespace: mysql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Mi - storageClassName: nfs-storage 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/dbclaim-pvc.yaml b/mysql/overlays/production/dbclaim-pvc.yaml deleted file mode 100644 index 12422f6b6..000000000 --- a/mysql/overlays/production/dbclaim-pvc.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: mysql-pv-claim - namespace: mysql -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Mi - storageClassName: nfs-storage 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/route.yaml b/mysql/route.yaml deleted file mode 100644 index d8193bc74..000000000 --- a/mysql/route.yaml +++ /dev/null @@ -1,16 +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-mng.example.com - path: "/todo" - to: - kind: Service - name: frontend - weight: 100 - wildcardPolicy: None 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/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 From 906e4cf4537f77d91986bddce55d14d3e80969cb Mon Sep 17 00:00:00 2001 From: Michael Jarrett Date: Thu, 19 May 2022 08:46:35 -0400 Subject: [PATCH 02/11] update --- base/application.yaml | 18 ------------------ base/route-mng.yaml | 17 ----------------- 2 files changed, 35 deletions(-) delete mode 100644 base/application.yaml delete mode 100644 base/route-mng.yaml 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/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 - From ec8b5daa7d889e0330683934509b6671adf77430 Mon Sep 17 00:00:00 2001 From: Michael Jarrett Date: Wed, 25 May 2022 03:57:04 -0400 Subject: [PATCH 03/11] removed --- base/route.yaml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 base/route.yaml 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 - From 013d4349d74368d047d4b0e1453d5b4dcb16552c Mon Sep 17 00:00:00 2001 From: Rafa Ruiz Date: Thu, 20 Oct 2022 13:14:56 +0200 Subject: [PATCH 04/11] kustomize storage --- base/deployment.yaml | 3 ++- base/kustomization.yaml | 7 +++++++ overlays/development/dbclaim-pvc.yaml | 11 +++++++++++ overlays/development/kustomization.yaml | 9 +++++++++ overlays/development/route.yaml | 15 +++++++++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 base/kustomization.yaml create mode 100644 overlays/development/dbclaim-pvc.yaml create mode 100644 overlays/development/kustomization.yaml create mode 100644 overlays/development/route.yaml diff --git a/base/deployment.yaml b/base/deployment.yaml index 9f4d3fa30..283b3bc49 100644 --- a/base/deployment.yaml +++ b/base/deployment.yaml @@ -38,7 +38,8 @@ spec: name: db-volume volumes: - name: db-volume - emptyDir: {} + persistentVolumeClaim: + claimName: mysql-pv-claim - 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/overlays/development/dbclaim-pvc.yaml b/overlays/development/dbclaim-pvc.yaml new file mode 100644 index 000000000..8ef66e9d6 --- /dev/null +++ b/overlays/development/dbclaim-pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: mysql-pv-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Mi + storageClassName: nfs-storage diff --git a/overlays/development/kustomization.yaml b/overlays/development/kustomization.yaml new file mode 100644 index 000000000..85ddfb27d --- /dev/null +++ b/overlays/development/kustomization.yaml @@ -0,0 +1,9 @@ +kind: Kustomization + +bases: + - ../../base + +resources: +- dbclaim-pvc.yaml +- route.yaml +namePrefix: dev- diff --git a/overlays/development/route.yaml b/overlays/development/route.yaml new file mode 100644 index 000000000..c08d9f74f --- /dev/null +++ b/overlays/development/route.yaml @@ -0,0 +1,15 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app: todonodejs + name: frontend + name: frontend +spec: + host: todo.apps.ocp4.example.com + path: "/todo" + to: + kind: Service + name: dev-frontend + weight: 100 + wildcardPolicy: None From bc5a2f61905a1c687f8b87f17d0e5505a87ae826 Mon Sep 17 00:00:00 2001 From: Rafa Ruiz Date: Thu, 20 Oct 2022 13:22:16 +0200 Subject: [PATCH 05/11] Mistake --- base/kustomization.yaml | 7 ------- overlays/development/dbclaim-pvc.yaml | 11 ----------- overlays/development/kustomization.yaml | 9 --------- overlays/development/route.yaml | 15 --------------- 4 files changed, 42 deletions(-) delete mode 100644 base/kustomization.yaml delete mode 100644 overlays/development/dbclaim-pvc.yaml delete mode 100644 overlays/development/kustomization.yaml delete mode 100644 overlays/development/route.yaml diff --git a/base/kustomization.yaml b/base/kustomization.yaml deleted file mode 100644 index d74d3a35d..000000000 --- a/base/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: Kustomization - -resources: -- deployment-frontend.yaml -- deployment.yaml -- service.yaml -- service-frontend.yaml diff --git a/overlays/development/dbclaim-pvc.yaml b/overlays/development/dbclaim-pvc.yaml deleted file mode 100644 index 8ef66e9d6..000000000 --- a/overlays/development/dbclaim-pvc.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: mysql-pv-claim -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Mi - storageClassName: nfs-storage diff --git a/overlays/development/kustomization.yaml b/overlays/development/kustomization.yaml deleted file mode 100644 index 85ddfb27d..000000000 --- a/overlays/development/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -kind: Kustomization - -bases: - - ../../base - -resources: -- dbclaim-pvc.yaml -- route.yaml -namePrefix: dev- diff --git a/overlays/development/route.yaml b/overlays/development/route.yaml deleted file mode 100644 index c08d9f74f..000000000 --- a/overlays/development/route.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - labels: - app: todonodejs - name: frontend - name: frontend -spec: - host: todo.apps.ocp4.example.com - path: "/todo" - to: - kind: Service - name: dev-frontend - weight: 100 - wildcardPolicy: None From a62c68a56bc4bb6580eb4fe59c3d6f75e0db25bb Mon Sep 17 00:00:00 2001 From: RafaR Date: Thu, 20 Oct 2022 13:30:46 +0200 Subject: [PATCH 06/11] Mistake 2 --- base/deployment.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/base/deployment.yaml b/base/deployment.yaml index 283b3bc49..9f4d3fa30 100644 --- a/base/deployment.yaml +++ b/base/deployment.yaml @@ -38,8 +38,7 @@ spec: name: db-volume volumes: - name: db-volume - persistentVolumeClaim: - claimName: mysql-pv-claim + emptyDir: {} - name: db-init emptyDir: {} --- From 5aa21887b4056477417597e30affeb0690a9961f Mon Sep 17 00:00:00 2001 From: Student User Date: Sun, 1 Sep 2024 14:34:55 -0400 Subject: [PATCH 07/11] kustomize storage --- base/deployment.yaml | 2 ++ base/kustomization.yaml | 7 +++++++ overlays/development/dbclaim-pvc.yaml | 11 +++++++++++ overlays/development/kustomization.yaml | 10 ++++++++++ overlays/development/route.yaml | 15 +++++++++++++++ 5 files changed, 45 insertions(+) create mode 100644 base/kustomization.yaml create mode 100644 overlays/development/dbclaim-pvc.yaml create mode 100644 overlays/development/kustomization.yaml create mode 100644 overlays/development/route.yaml 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/overlays/development/dbclaim-pvc.yaml b/overlays/development/dbclaim-pvc.yaml new file mode 100644 index 000000000..8ef66e9d6 --- /dev/null +++ b/overlays/development/dbclaim-pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: mysql-pv-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Mi + storageClassName: nfs-storage diff --git a/overlays/development/kustomization.yaml b/overlays/development/kustomization.yaml new file mode 100644 index 000000000..f036e7de1 --- /dev/null +++ b/overlays/development/kustomization.yaml @@ -0,0 +1,10 @@ +kind: Kustomization + +bases: + - ../../base + +resources: +- dbclaim-pvc.yaml +- route +namePrefix: dev- + diff --git a/overlays/development/route.yaml b/overlays/development/route.yaml new file mode 100644 index 000000000..c08d9f74f --- /dev/null +++ b/overlays/development/route.yaml @@ -0,0 +1,15 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app: todonodejs + name: frontend + name: frontend +spec: + host: todo.apps.ocp4.example.com + path: "/todo" + to: + kind: Service + name: dev-frontend + weight: 100 + wildcardPolicy: None From 52069685cc97faeb1ce14da6e4c8c2e910318185 Mon Sep 17 00:00:00 2001 From: Student User Date: Sun, 1 Sep 2024 14:43:40 -0400 Subject: [PATCH 08/11] kustomize storage --- overlays/development/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/development/kustomization.yaml b/overlays/development/kustomization.yaml index f036e7de1..0eedb036e 100644 --- a/overlays/development/kustomization.yaml +++ b/overlays/development/kustomization.yaml @@ -5,6 +5,6 @@ bases: resources: - dbclaim-pvc.yaml -- route +- route.yaml namePrefix: dev- From cda93708a8ae4ecb6e5999fa4eaf9036ab865f97 Mon Sep 17 00:00:00 2001 From: Student User Date: Sun, 1 Sep 2024 14:53:59 -0400 Subject: [PATCH 09/11] prod kustomize storage --- overlays/production/dbclaim-pvc.yaml | 11 +++++++++++ overlays/production/kustomization.yaml | 9 +++++++++ overlays/production/route-mng.yaml | 15 +++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 overlays/production/dbclaim-pvc.yaml create mode 100644 overlays/production/kustomization.yaml create mode 100644 overlays/production/route-mng.yaml diff --git a/overlays/production/dbclaim-pvc.yaml b/overlays/production/dbclaim-pvc.yaml new file mode 100644 index 000000000..c1e320262 --- /dev/null +++ b/overlays/production/dbclaim-pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: mysql-pv-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 50Mi + storageClassName: nfs-storage diff --git a/overlays/production/kustomization.yaml b/overlays/production/kustomization.yaml new file mode 100644 index 000000000..786453e98 --- /dev/null +++ b/overlays/production/kustomization.yaml @@ -0,0 +1,9 @@ +kind: Kustomization + +bases: + - ../../base + +resources: +- dbclaim-pvc.yaml +- route-mng.yaml +namePrefix: prod- diff --git a/overlays/production/route-mng.yaml b/overlays/production/route-mng.yaml new file mode 100644 index 000000000..09fc7987a --- /dev/null +++ b/overlays/production/route-mng.yaml @@ -0,0 +1,15 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app: todonodejs + name: frontend + name: frontend +spec: + host: todo.apps.ocp4-mng.example.com + path: "/todo" + to: + kind: Service + name: prod-frontend + weight: 100 + wildcardPolicy: None From 4931119a985dd6529e612c083c45151a501fb38b Mon Sep 17 00:00:00 2001 From: jlasquinha Date: Thu, 5 Sep 2024 09:50:04 -0300 Subject: [PATCH 10/11] Delete overlays/production directory --- overlays/production/dbclaim-pvc.yaml | 11 ----------- overlays/production/kustomization.yaml | 9 --------- overlays/production/route-mng.yaml | 15 --------------- 3 files changed, 35 deletions(-) delete mode 100644 overlays/production/dbclaim-pvc.yaml delete mode 100644 overlays/production/kustomization.yaml delete mode 100644 overlays/production/route-mng.yaml diff --git a/overlays/production/dbclaim-pvc.yaml b/overlays/production/dbclaim-pvc.yaml deleted file mode 100644 index c1e320262..000000000 --- a/overlays/production/dbclaim-pvc.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: mysql-pv-claim -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 50Mi - storageClassName: nfs-storage diff --git a/overlays/production/kustomization.yaml b/overlays/production/kustomization.yaml deleted file mode 100644 index 786453e98..000000000 --- a/overlays/production/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -kind: Kustomization - -bases: - - ../../base - -resources: -- dbclaim-pvc.yaml -- route-mng.yaml -namePrefix: prod- diff --git a/overlays/production/route-mng.yaml b/overlays/production/route-mng.yaml deleted file mode 100644 index 09fc7987a..000000000 --- a/overlays/production/route-mng.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - labels: - app: todonodejs - name: frontend - name: frontend -spec: - host: todo.apps.ocp4-mng.example.com - path: "/todo" - to: - kind: Service - name: prod-frontend - weight: 100 - wildcardPolicy: None From 839d7b379f41baca132bc81f20f5221193bec84e Mon Sep 17 00:00:00 2001 From: jlasquinha Date: Thu, 5 Sep 2024 08:52:48 -0400 Subject: [PATCH 11/11] Add files via upload --- overlays/production/dbclaim-pvc.yaml | 11 +++++++++++ overlays/production/kustomization.yaml | 10 ++++++++++ overlays/production/route.yaml | 15 +++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 overlays/production/dbclaim-pvc.yaml create mode 100644 overlays/production/kustomization.yaml create mode 100644 overlays/production/route.yaml diff --git a/overlays/production/dbclaim-pvc.yaml b/overlays/production/dbclaim-pvc.yaml new file mode 100644 index 000000000..c1e320262 --- /dev/null +++ b/overlays/production/dbclaim-pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: mysql-pv-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + 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/overlays/production/route.yaml b/overlays/production/route.yaml new file mode 100644 index 000000000..09fc7987a --- /dev/null +++ b/overlays/production/route.yaml @@ -0,0 +1,15 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + labels: + app: todonodejs + name: frontend + name: frontend +spec: + host: todo.apps.ocp4-mng.example.com + path: "/todo" + to: + kind: Service + name: prod-frontend + weight: 100 + wildcardPolicy: None