apiVersion: v1
kind: ConfigMap
metadata:
  name: app.py
  namespace: ice

data:
  halfmemory: |
    import random
    import time

    while True:
      data = []
      for y in range(1,128000):
        line = ""
        for x in range(1,1024):
          line += str(random.randint(1,9))
        data.append(line)

  randomcpu: |
    import random
    import time

    rnd = random.randint(1,9)/1000
    while True:
      data = []
      for y in range(1,128):
        line = ""
        for x in range(1,1024):
          line += str(random.randint(1,9))
        data.append(line)
        time.sleep(rnd)
      
  oddcpu: |
    import random
    import time

    rnd = random.randint(1,9)
    while True:
      data = []
      for y in range(1,128):
        line = ""
        for x in range(1,1024):
          line += str(random.randint(1,9))
        data.append(line)
        if rnd <= 2:
          time.sleep(0.01)
        else:
          time.sleep(0.7)    

  singlepod: |
    import random
    import time

    rnd = random.randint(1,9)/1000
    while True:
      data = []
      for y in range(1,128):
        line = ""
        for x in range(1,1024):
          line += str(random.randint(1,9))
        data.append(line)
        time.sleep(rnd)
