mulbc / gosbench

Distributed S3 benchmarking tool - Replacement of Cosbench
GNU General Public License v3.0
42 stars 16 forks source link

ServiceAccount name differentiates, causes error when applying yaml #14

Closed cedricclyburn closed 1 year ago

cedricclyburn commented 1 year ago

Working with Natale to debug these errors, this happened on his cluster, but I just reran on mine and didn't experience anything. Keeping here for now, will retry later.

Describe the bug

Due to a ServiceAccount name difference in the generated yaml, causes an error when applying yaml file.

To Reproduce Steps to reproduce the behavior:

  1. Apply generated yaml file in OpenShift cluster
  2. Error due to mismatch of ServiceAccount name

Expected behavior

Expected to apply yaml file and workshop begin to start

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Here's the specific difference that caused the error:

###
# Code generated by goroom.blum.coffee
# This can be used directly with "oc apply -f" or "kubectl apply -f"
#   to deploy a goroom environment
###

apiVersion: v1
kind: Namespace
metadata:
  name: default
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: gosbench-role <--
  namespace: default
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: gosbench-role-binding
subjects:
  - kind: ServiceAccount
    name: gosbench-role
    namespace: default
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: Service
metadata:
  name: goroom-app
  namespace: default
  labels:
    app: goroom-app
spec:
  # type: NodePort
  ports:
    - port: 8080
      name: goroom-app
  selector:
    app: goroom-app
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: goroom-app
  namespace: default
  labels:
    app: goroom-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: goroom-app
  template:
    metadata:
      labels:
        app: goroom-app
    spec:
      serviceAccountName: k8s-101-role <--
...