Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 12 commits into from
Oct 9, 2023

Conversation

rustyShacklefurd
Copy link
Contributor

@rustyShacklefurd rustyShacklefurd commented Aug 21, 2023

Description:

Related issue(s):

Fixes #

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@rustyShacklefurd rustyShacklefurd changed the title Adding a section for a single pod hosted server-repository setup [WIP] Adding a section for a single pod hosted server-repository setup Aug 21, 2023
@rustyShacklefurd
Copy link
Contributor Author

---
# 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.

…out issues. Set the server port to 5555 and the repo port to 10000 to have something available here

Signed-off-by: Matt Halder <[email protected]>
…art but the configuration for server to init are still needed

Signed-off-by: Matt Halder <[email protected]>
…elling the deployment to use this configmap, and adding annotations option to the UI service. The configmap values also got added to the values.yaml file.

Signed-off-by: Matt Halder <[email protected]>
…nnotation support and uses port 80 by default. There is a misspelling in the deployment port spec that makes it misalign with the service spec, that misspelling got corrected here as well

Signed-off-by: Matt Halder <[email protected]>
…to use purely https calls from UI the sourcify-server. Due to UI javascript limitations we cannot utilized this setup (although the adapter pattern is nice to have

Signed-off-by: Matt Halder <[email protected]>
…d to be updated. Configmap was updated to contain a seperate configuration for the repository component. Lastly the secret was deleted as part of the the kubernetes adapter https setup; that setup is not valid for this application

Signed-off-by: Matt Halder <[email protected]>
@rustyShacklefurd rustyShacklefurd marked this pull request as ready for review October 9, 2023 17:22
Signed-off-by: Matt Halder <[email protected]>
@rustyShacklefurd rustyShacklefurd changed the title [WIP] Adding a section for a single pod hosted server-repository setup Adding a section for a single pod hosted server-repository setup Oct 9, 2023
@rustyShacklefurd rustyShacklefurd merged commit 5c8c366 into main Oct 9, 2023
2 checks passed
@rustyShacklefurd rustyShacklefurd deleted the helm-repo-server-one-pod branch October 9, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant