Skip to content
Snippets Groups Projects
Select Git revision
2 results Searching

php-load-tester

  • Clone with SSH
  • Clone with HTTPS
  • Deployment

    Use the following config to deploy.

    apiVersion: v1
    kind: Namespace
    metadata:
      name: php-load-tester
    
    # Please edit the object below. Lines beginning with a '#' will be ignored,
    # and an empty file will abort the edit. If an error occurs while saving this file will be
    # reopened with the relevant failures.
    #
    ---
    apiVersion: v1
    data:
      .dockerconfigjson: eyJhdXRocyI6IHsiaHR0cHM6Ly9kb2NrZXIudWNhbGdhcnkuY2EiOiB7ImF1dGgiOiAiYkd4bGRXNW5PbVZZT0dGWU9XdEJPVmxYZW5sWFRtZzBhbmsxIn19fQ==
    kind: Secret
    metadata:
      name: caas
      namespace: php-load-tester
    type: kubernetes.io/dockerconfigjson
    ---
    apiVersion: extensions/v1beta1
    kind: ReplicaSet
    metadata:
      name: php-load-tester
      namespace: php-load-tester
      labels:
        app: php-load-tester-app
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: php-load-tester-app
      template:
        metadata:
          labels:
            app: php-load-tester-app
        spec:
          containers:
          - name: php-load-tester
            image: docker.ucalgary.ca/lleung/php-load-tester:latest
            imagePullPolicy: IfNotPresent
            livenessProbe:
              tcpSocket:
                port: 80
              initialDelaySeconds: 120
              periodSeconds: 10
          tolerations:
          - key: node-role.kubernetes.io/master
            effect: NoSchedule
          imagePullSecrets:
            - name: caas
    #         args: ["log"]
    #         volumeMounts:
    #         - mountPath: /var/log/httpd
    #           name: apache-log
    #       volumes:
    #       - name: apache-log
    #         hostPath:
    #           path: /var/log/httpd
    #           type: Directory
    #
    
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: php-load-service
      namespace: php-load-tester
    spec:
      ports:
      - port: 80
        name: http
        protocol: TCP
      selector:
        app: php-load-tester-app
    ---
    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      name: php-load-ingress
      namespace: php-load-tester
      annotations:
        kubernetes.io/ingress.class: "tectonic"
        ingress.kubernetes.io/rewrite-target: /
        ingress.kubernetes.io/ssl-redirect: "true"
        ingress.kubernetes.io/use-port-in-redirects: "true"
    spec:
      rules:
        - host: itsocaaspoc-ingress01.uc.ucalgary.ca
          http:
            paths:
              - path: /
                backend:
                  serviceName: php-load-service
                  servicePort: 80
    status:
      loadBalancer: {}