Skip to content

Commit

Permalink
remove es from platform helm dependencies; update crd (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Zubenko authored Jun 16, 2020
1 parent a9e9819 commit 59ee0bb
Show file tree
Hide file tree
Showing 25 changed files with 50 additions and 85 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ helm_push:
ifeq ($(TAG),latest)
$(error Helm package tag is not specified)
endif
rm -rf deploy/platform/charts
helm dependency update deploy/platform
helm package --app-version=$(TAG) --version=$(TAG) deploy/platform/
helm push-artifactory platform-$(TAG).tgz neuro-local-public
Expand Down
32 changes: 32 additions & 0 deletions deploy/platform-operator/templates/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ spec:
type: object
required:
- token
- storage
- monitoring
properties:
token:
type: string
Expand Down Expand Up @@ -269,8 +271,38 @@ spec:
type: string
storageAccountKey:
type: string
kubernetes:
type: object
required:
- persistence
properties:
persistence:
type: object
required:
- storageClassName
properties:
storageClassName:
type: string
size:
type: string
oneOf:
- properties:
azure: {}
required:
- azure
- properties:
kubernetes: {}
required:
- kubernetes
monitoring:
type: object
required:
- logs
properties:
logs:
type: object
required:
- bucket
properties:
bucket:
type: string
34 changes: 7 additions & 27 deletions deploy/platform/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,6 @@ dependencies:
- aws
- azure
- on_prem
- name: elasticsearch
version: "1.33.1"
repository: "@neuro"
tags:
- gcp
- aws
- azure
- on_prem
- name: elasticsearch-curator
version: "2.1.3"
repository: "@neuro"
tags:
- gcp
- aws
- azure
- on_prem
- name: fluent-bit
version: "2.8.14"
repository: "@stable"
alias: fluent-bit
tags:
- gcp
- aws
- azure
- on_prem
- name: cluster-autoscaler
version: "6.2.0"
repository: "@stable"
Expand All @@ -59,7 +34,7 @@ dependencies:
tags:
- gcp
- name: nvidia-gpu-driver
version: "1.0.0"
version: "1.0.1"
repository: "@neuro"
tags:
- aws
Expand All @@ -70,6 +45,11 @@ dependencies:
repository: "@stable"
tags:
- on_prem
- name: minio
version: "5.0.29"
repository: "@stable"
tags:
- on_prem
- name: ssh-auth
version: "1.0.6"
repository: "@neuro"
Expand Down Expand Up @@ -97,7 +77,7 @@ dependencies:
- azure
- on_prem
- name: platformmonitoringapi
version: "1.0.9"
version: "1.1.0"
repository: "@neuro"
alias: platform-monitoring
tags:
Expand Down
6 changes: 0 additions & 6 deletions deploy/platform/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,4 @@ release: {{ .Release.Name | quote }}
}
}
}
{{- end -}}

{{- define "platform.isSelfContained" -}}
{{- if has true (values .Values.tags) -}}
true
{{- end -}}
{{- end -}}
2 changes: 0 additions & 2 deletions deploy/platform/templates/acme-ca-cert-daemon-set.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
{{- if (default false .Values.traefik.acme.staging) }}
apiVersion: apps/v1
kind: DaemonSet
Expand Down Expand Up @@ -45,5 +44,4 @@ spec:
- name: certs
hostPath:
path: /etc/docker/certs.d
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions deploy/platform/templates/blob-storage-key-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
{{- if not .Values.tags.on_prem }}
apiVersion: v1
kind: Secret
Expand All @@ -17,5 +16,4 @@ data:
account_name: {{ .Values.blobStorage.azure.storageAccountName | b64enc | quote }}
account_key: {{ .Values.blobStorage.azure.storageAccountKey | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand All @@ -15,5 +14,4 @@ spec:
- namespaceSelector: {}
podSelector:
matchLabels:
{{ toYaml .Values.traefik.deployment.podLabels | indent 10 }}
{{- end }}
{{ toYaml .Values.traefik.deployment.podLabels | indent 10 }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand All @@ -15,5 +14,4 @@ spec:
- namespaceSelector: {}
podSelector:
matchLabels:
service: ssh-auth
{{- end }}
service: ssh-auth
2 changes: 0 additions & 2 deletions deploy/platform/templates/gcp-service-account-key-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
{{- if .Values.tags.gcp }}
apiVersion: v1
kind: Secret
Expand All @@ -8,5 +7,4 @@ metadata:
{{ include "platform.labels.standard" . | indent 4 }}
data:
key.json: {{ .Values.gcp.serviceAccountKeyBase64 | quote }}
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions deploy/platform/templates/idle-jobs-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
{{- $standardLabels := include "platform.labels.standard" . }}
{{- $appName := include "platform.name" . }}
{{- $releaseName := .Release.Name }}
Expand Down Expand Up @@ -100,5 +99,4 @@ spec:
topologyKey: kubernetes.io/hostname
---
{{- end }}
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions deploy/platform/templates/image-pull-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
{{- if .Values.imagePullSecret.create }}
apiVersion: v1
kind: Secret
Expand All @@ -15,5 +14,4 @@ data:
{{- $credentials := .Values.imagePullSecret.credentials }}
{{- $dockerConfigJson := include "platform.dockerConfigJson" $credentials }}
.dockerconfigjson: {{ $dockerConfigJson | b64enc | quote }}
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions deploy/platform/templates/images-prepull-daemon-set.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
{{- $imagesPrepull := .Values.kubernetes.imagesPrepull }}
{{- if .Values.kubernetes.imagesPrepull }}
{{- if gt (len .Values.kubernetes.imagesPrepull.images) 0 }}
Expand Down Expand Up @@ -55,5 +54,4 @@ spec:
nodeSelector:
{{ .Values.jobs.label }}: "true"
{{- end }}
{{- end }}
{{- end }}
4 changes: 1 addition & 3 deletions deploy/platform/templates/jobs-admin-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand All @@ -16,5 +15,4 @@ subjects:
roleRef:
kind: ClusterRole
name: admin
apiGroup: rbac.authorization.k8s.io
{{- end }}
apiGroup: rbac.authorization.k8s.io
4 changes: 1 addition & 3 deletions deploy/platform/templates/jobs-cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand All @@ -15,5 +14,4 @@ subjects:
roleRef:
kind: ClusterRole
name: {{ include "platform.jobs.serviceAccountName" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
apiGroup: rbac.authorization.k8s.io
4 changes: 1 addition & 3 deletions deploy/platform/templates/jobs-cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand All @@ -14,5 +13,4 @@ rules:
- create
- get
- list
- watch
{{- end }}
- watch
2 changes: 0 additions & 2 deletions deploy/platform/templates/jobs-namespace.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{{- if include "platform.isSelfContained" . }}
{{- if .Values.jobs.namespace.create }}
apiVersion: v1
kind: Namespace
metadata:
name: {{ include "platform.jobs.namespace.name" . }}
labels:
{{ include "platform.labels.standard" . | indent 4 }}
{{- end }}
{{- end }}
2 changes: 0 additions & 2 deletions deploy/platform/templates/jobs-pv.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: v1
kind: PersistentVolume
metadata:
Expand Down Expand Up @@ -32,5 +31,4 @@ spec:
bucket: {{ .Values.storage.gcs.bucketName }}
key_file: /accounts/key.json
additional_args: --limit-ops-per-sec 0
{{- end }}
{{- end }}
4 changes: 1 addition & 3 deletions deploy/platform/templates/jobs-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -14,5 +13,4 @@ spec:
requests:
storage: {{ .Values.storage.size }}
storageClassName: ""
volumeName: {{ include "platform.storage.jobsPvName" . }}
{{- end }}
volumeName: {{ include "platform.storage.jobsPvName" . }}
4 changes: 1 addition & 3 deletions deploy/platform/templates/jobs-service-account.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "platform.jobs.serviceAccountName" . }}
namespace: {{ include "platform.jobs.namespace.name" . }}
labels:
{{ include "platform.labels.standard" . | indent 4 }}
automountServiceAccountToken: false
{{- end }}
automountServiceAccountToken: false
2 changes: 0 additions & 2 deletions deploy/platform/templates/platform-pv.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: v1
kind: PersistentVolume
metadata:
Expand Down Expand Up @@ -31,5 +30,4 @@ spec:
bucket: {{ .Values.storage.gcs.bucketName }}
key_file: /accounts/key.json
additional_args: --limit-ops-per-sec 0
{{- end }}
{{- end }}
4 changes: 1 addition & 3 deletions deploy/platform/templates/platform-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
Expand All @@ -13,5 +12,4 @@ spec:
requests:
storage: {{ .Values.storage.size }}
storageClassName: ""
volumeName: {{ include "platform.storage.platformPvName" . }}
{{- end }}
volumeName: {{ include "platform.storage.platformPvName" . }}
2 changes: 0 additions & 2 deletions deploy/platform/templates/platform-registry-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -12,5 +11,4 @@ data:
{{- else }}
username: {{ .Values.registry.username | b64enc | quote }}
password: {{ .Values.registry.password | b64enc | quote }}
{{- end }}
{{- end }}
4 changes: 1 addition & 3 deletions deploy/platform/templates/platform-services-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -9,5 +8,4 @@ data:
compute_token: {{ .Values.serviceToken | b64enc | quote }}
registry_token: {{ .Values.serviceToken | b64enc | quote }}
storage_token: {{ .Values.serviceToken | b64enc | quote }}
cluster_token: {{ .Values.serviceToken | b64enc | quote }}
{{- end }}
cluster_token: {{ .Values.serviceToken | b64enc | quote }}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{{- if include "platform.isSelfContained" . }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-resolve-dns-challenge-script
labels:
{{ include "platform.labels.standard" . | indent 4 }}
data:
{{ (.Files.Glob "files/resolve_dns_challenge.sh").AsConfig | indent 2 }}
{{- end }}
{{ (.Files.Glob "files/resolve_dns_challenge.sh").AsConfig | indent 2 }}
Loading

0 comments on commit 59ee0bb

Please sign in to comment.