-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added charts for k8 and fixed jenkins for deploys
- Loading branch information
1 parent
5582690
commit 6dcf804
Showing
17 changed files
with
975 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: specular | ||
description: Specular L2 Network | ||
version: 0.0.1 | ||
apiVersion: v2 | ||
keywords: | ||
- specular |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: specular-config | ||
data: | ||
{{- range $i, $value := .Values.configMaps }} | ||
{{ $i }}: | | ||
{{- range $ii, $item := $value }} | ||
{{ $item.name }}={{ $item.value }} | ||
{{- end }} | ||
{{- end }} | ||
{{- range $name, $value := .Values.jsonMaps }} | ||
{{ $name }}: | | ||
{{ $value | toJson }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{- if .Values.enabled.debug -}} | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: debug-container | ||
namespace: specular | ||
spec: | ||
# initContainers: | ||
# - name: wait-for-sp-geth | ||
# image: busybox:latest | ||
# command: ["sh", "-c", "echo '{{ .Values.image.tag }}' > /tmp/release"] | ||
# volumeMounts: | ||
# - mountPath: /tmp | ||
# name: {{ .Values.volume.efs.name }} | ||
containers: | ||
- name: debug-container | ||
image: nginx | ||
volumeMounts: | ||
- mountPath: /tmp/workspace | ||
name: {{ .Values.volume.efs.name }} | ||
{{- range $i, $value := .Values.volume.configVolumeMounts.paths }} | ||
- name: {{ $.Values.volume.configVolumeMounts.name }} | ||
mountPath: /tmp/workspace/{{ $value }} | ||
subPath: {{ $value }} | ||
{{- end }} | ||
{{- if not .Values.generator.deploy }} | ||
{{- range $i, $value := .Values.volume.secrets }} | ||
- name: secret-volume | ||
mountPath: /tmp/workspace/{{ $value.file }} | ||
subPath: {{ $value.file }} | ||
readOnly: true | ||
{{- end }} | ||
{{- end }} | ||
workingDir: /tmp/workspace | ||
restartPolicy: OnFailure | ||
volumes: | ||
- name: {{ .Values.volume.efs.name }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.volume.efs.name }} | ||
- name: {{ .Values.volume.configVolumeMounts.name }} | ||
configMap: | ||
name: {{ .Values.volume.configVolumeMounts.name }} | ||
{{- if not .Values.generator.deploy }} | ||
- name: secret-volume | ||
secret: | ||
secretName: l2-secrets | ||
{{- end }} | ||
status: {} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.specular.network/sp-network: "true" | ||
io.specular.service: generator | ||
name: generator | ||
spec: | ||
containers: | ||
- name: generator | ||
command: ["bash", "-c", "{{ .Values.generator.command }}"] | ||
image: "{{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}" | ||
resources: | ||
{{- .Values.default_resources | toYaml | nindent 10 }} | ||
volumeMounts: | ||
- mountPath: {{ .Values.volume.efs.mountPath }} | ||
name: {{ .Values.volume.efs.name }} | ||
{{- range $i, $value := .Values.volume.configVolumeMounts.paths }} | ||
- name: {{ $.Values.volume.configVolumeMounts.name }} | ||
mountPath: {{ $.Values.volume.efs.mountPath }}/{{ $value }} | ||
subPath: {{ $value }} | ||
{{- end }} | ||
{{- if not .Values.generator.deploy }} | ||
{{- range $i, $value := .Values.volume.secrets }} | ||
- name: secret-volume | ||
mountPath: {{ $.Values.volume.efs.mountPath }}/{{ $value.file }} | ||
subPath: {{ $value.file }} | ||
readOnly: true | ||
{{- end }} | ||
{{- end }} | ||
restartPolicy: Never | ||
volumes: | ||
- name: {{ .Values.volume.efs.name }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.volume.efs.name }} | ||
- name: {{ .Values.volume.configVolumeMounts.name }} | ||
configMap: | ||
name: {{ .Values.volume.configVolumeMounts.name }} | ||
{{- if not .Values.generator.deploy }} | ||
- name: secret-volume | ||
secret: | ||
secretName: l2-secrets | ||
{{- end }} | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: specular-ingress | ||
namespace: specular | ||
annotations: | ||
|
||
# nginx.ingress.kubernetes.io/ssl-redirect: "true" | ||
# nginx.ingress.kubernetes.io/force-ssl-redirect: "true" | ||
nginx.ingress.kubernetes.io/rewrite-target: / | ||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP" | ||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- host: {{ .Values.environment }}.specular.network | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: sp-geth | ||
port: | ||
number: 4011 | ||
- path: /ws | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: sp-geth | ||
port: | ||
number: 4012 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{{- if .Values.enabled.l1Geth -}} | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.specular.network/sp-network: "true" | ||
io.specular.service: l1-geth | ||
name: l1-geth | ||
spec: | ||
initContainers: | ||
- name: wait-for-sp-generator | ||
image: busybox:latest | ||
command: ["sh", "-c", "until [ -f /tmp/.generate_secrets.sh.lock ]; do sleep 2; done"] | ||
volumeMounts: | ||
- mountPath: /tmp | ||
name: {{ .Values.volume.efs.name }} | ||
containers: | ||
- name: l1-geth | ||
command: ["bash", "-c", "../sbin/entrypoint.sh start start_l1.sh -c -d -w -y"] | ||
image: "{{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}" | ||
livenessProbe: | ||
exec: | ||
command: ["sh", "-c", "test -e /specular/workspace/.start_l1.sh.lock"] | ||
failureThreshold: 300 | ||
initialDelaySeconds: 60 | ||
periodSeconds: 1 | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: ["sh", "-c", "rm -f /specular/workspace/.*.lock"] | ||
ports: | ||
- containerPort: 8545 | ||
hostPort: 8545 | ||
protocol: TCP | ||
resources: | ||
{{- .Values.default_resources | toYaml | nindent 10 }} | ||
tty: true | ||
volumeMounts: | ||
- mountPath: {{ .Values.volume.efs.mountPath }} | ||
name: {{ .Values.volume.efs.name }} | ||
{{- range $i, $value := .Values.volume.configVolumeMounts.paths }} | ||
- name: {{ $.Values.volume.configVolumeMounts.name }} | ||
mountPath: {{ $.Values.volume.efs.mountPath }}/{{ $value }} | ||
subPath: {{ $value }} | ||
{{- end }} | ||
{{- if not .Values.generator.deploy }} | ||
{{- range $i, $value := .Values.volume.secrets }} | ||
- name: secret-volume | ||
mountPath: {{ $.Values.volume.efs.mountPath }}/{{ $value.file }} | ||
subPath: {{ $value.file }} | ||
readOnly: true | ||
{{- end }} | ||
{{- end }} | ||
workingDir: {{ .Values.volume.efs.mountPath }} | ||
restartPolicy: Always | ||
volumes: | ||
- name: {{ .Values.volume.efs.name }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.volume.efs.name }} | ||
- name: {{ .Values.volume.configVolumeMounts.name }} | ||
configMap: | ||
name: {{ .Values.volume.configVolumeMounts.name }} | ||
status: {} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{- if .Values.enabled.l1Geth -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.specular.service: l1-geth | ||
name: l1-geth | ||
spec: | ||
ports: | ||
- name: "8545" | ||
port: 8545 | ||
targetPort: 8545 | ||
- name: "8546" | ||
port: 8546 | ||
targetPort: 8546 | ||
selector: | ||
io.specular.service: l1-geth | ||
{{- end -}} |
Oops, something went wrong.