hashgraph / hedera-sourcify

Tools for verifying Hedera smart contracts using standard open source libraries.
Apache License 2.0
6 stars 7 forks source link

Adding a section for a single pod hosted server-repository setup #26

Closed rustyShacklefurd closed 8 months ago

rustyShacklefurd commented 10 months ago

Description:

Related issue(s):

Fixes #

Notes for reviewer:

Checklist

rustyShacklefurd commented 10 months ago
---
# Source: sourcify/templates/server-repository/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: server-repository
  labels:
    helm.sh/chart: sourcify-0.1.0
    app.kubernetes.io/managed-by: Helm
---
# Source: sourcify/templates/ui/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: ui
  labels:
    helm.sh/chart: sourcify-0.1.0
    app.kubernetes.io/managed-by: Helm
---
# Source: sourcify/templates/server-repository/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: sourcify-test-serverRepository
  labels:
    helm.sh/chart: sourcify-0.1.0
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
    - port: 443
      targetPort: https
      protocol: TCP
      name: https
  selector:
    app.kubernetes.io/name: sourcify-server-repository
---
# Source: sourcify/templates/ui/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: sourcify-test-ui
  labels:
    helm.sh/chart: sourcify-0.1.0
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
    - port: 443
      targetPort: https
      protocol: TCP
      name: https
  selector:
    app.kubernetes.io/name: sourcify-ui
---
# Source: sourcify/templates/server-repository/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sourcify-
  labels:
    helm.sh/chart: sourcify-0.1.0
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: sourcify-server-repository
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: sourcify-server-repository
  template:
    metadata:
      labels:
        app.kubernetes.io/name: sourcify-server-repository
    spec:
      serviceAccountName: server-repository
      containers:
        - name: sourcify-server
          securityContext:
            null
          image: "ghcr.io/hashgraph/hedera-sourcify:server-latest"
          imagePullPolicy: IfNotPresent
          ports:
            - name: https
              containerPort: 443
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: https
          readinessProbe:
            httpGet:
              path: /
              port: https
          volumeMounts:
            - name: sourcify--pvc
              mountPath: /usr/etc/hedera
        - name: sourcify-repository
          securityContext:
            null
          image: "ghcr.io/hashgraph/hedera-sourcify:repository-latest"
          imagePullPolicy: IfNotPresent
          ports:
            - name: https
              containerPort: 443
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: https
          readinessProbe:
            httpGet:
              path: /
              port: https
          volumeMounts:
            - name: sourcify-server-pvc
              mountPath: /data
              readOnly: true
        - name: sourcify
          emptyDir: {}
---
# Source: sourcify/templates/ui/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sourcify-ui
  labels:
    helm.sh/chart: sourcify-0.1.0
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: sourcify-ui
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: sourcify-ui
  template:
    metadata:
      labels:
        app.kubernetes.io/name: sourcify-ui
    spec:
      serviceAccountName: ui
      containers:
        - name: sourcify-ui
          securityContext:
            null
          image: "ghcr.io/hashgraph/hedera-sourcify:ui-latest"
          imagePullPolicy: IfNotPresent
          ports:
            - name: https
              containerPort: 443
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /
              port: https
          readinessProbe:
            httpGet:
              path: /
              port: https
---
# Source: sourcify/templates/server-repository/tests/test-connection.yaml
apiVersion: v1
kind: Pod
metadata:
  name: "sourcify-test-server-repository-test-connection"
  labels:
    helm.sh/chart: sourcify-0.1.0
    app.kubernetes.io/managed-by: Helm
  annotations:
    "helm.sh/hook": test
spec:
  containers:
    - name: wget
      image: busybox
      command: ['wget']
      args: ['sourcify-test:443']
  restartPolicy: Never
---
# Source: sourcify/templates/ui/tests/test-connection.yaml
apiVersion: v1
kind: Pod
metadata:
  name: "sourcify-test-ui-test-connection"
  labels:
    helm.sh/chart: sourcify-0.1.0
    app.kubernetes.io/managed-by: Helm
  annotations:
    "helm.sh/hook": test
spec:
  containers:
    - name: wget
      image: busybox
      command: ['wget']
      args: ['sourcify-test:443']
  restartPolicy: Never

Still needs testing for persistent volumes and emptyDir.