apiVersion: v1
kind: ServiceAccount
metadata:
  name: tdb-tinyurl
---
apiVersion: v1
data:
  .dockerconfigjson: ewoJImF1dGhzIjogewoJCSJkb2NrZXIuYWRhb25jbG91ZC5jb20iOiB7CgkJCSJhdXRoIjogIlpHOWphMlZ5ZFhObGNqcGxOMEV4WkRsaVJtVTAiCgkJfQoJfQp9
kind: Secret
metadata:
  name: ada-registry
type: kubernetes.io/dockerconfigjson
---
apiVersion: v1
kind: Service
metadata:
  name: tdb-tinyurl
  labels:
    app: tdb-tinyurl
    service: tdb-tinyurl
spec:
  ports:
  - name: http-tdb-tinyurl
    port: 8080
    targetPort: 8080
  selector:
    app: tdb-tinyurl
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tdb-tinyurl
spec:
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      app: tdb-tinyurl
  template:
    metadata:
      labels:
        app: tdb-tinyurl
    spec:
      serviceAccountName: tdb-tinyurl
      containers:
      - name: tdb-tinyurl
        image: docker.adaoncloud.com/tdb/tdb-tinyurl:latest
        ports:
        - containerPort: 8080
        imagePullPolicy: Always
      restartPolicy: Always
      imagePullSecrets:
        - name: ada-registry
