diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index a3d4fd5..a097828 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -164,7 +164,7 @@ curl -X POST "http://localhost:8000/api/v1/artifacts/query" \ make deploy # Or directly with Helm -helm install datalake ./helm --namespace datalake --create-namespace +helm install warehouse13 ./helm/warehouse13 --namespace warehouse13 --create-namespace ``` ## Feature Flags Usage @@ -190,9 +190,8 @@ AWS_REGION=us-east-1 S3_BUCKET_NAME=your-bucket # Deploy -helm install datalake ./helm \ - --set config.deploymentMode=cloud \ - --set aws.enabled=true +helm install warehouse13 ./helm/warehouse13 \ + --set global.deploymentMode=cloud ``` ## What's Next diff --git a/helm/Chart.yaml b/helm/Chart.yaml deleted file mode 100644 index f93d136..0000000 --- a/helm/Chart.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v2 -name: warehouse13 -description: Warehouse13 - Enterprise Test Artifact Storage (Legacy Chart - Use ./warehouse13 instead) -type: application -version: 1.0.0 -appVersion: "1.0.0" -keywords: - - testing - - artifacts - - storage - - datalake -deprecated: true -maintainers: - - name: Warehouse13 Team diff --git a/helm/README.md b/helm/README.md index fed3a93..71d168f 100644 --- a/helm/README.md +++ b/helm/README.md @@ -20,23 +20,19 @@ helm install warehouse13 ./warehouse13 **Documentation:** See [warehouse13/README.md](./warehouse13/README.md) -## Legacy Chart (Deprecated) +## Migration from Legacy Chart -The files in this root `helm/` directory are from an older version and are marked as deprecated. Please use the `./warehouse13/` chart instead. - -## Migration - -If you're using the old chart, migration is straightforward: +If you were using an older version of the chart, migration is straightforward: ```bash -# Uninstall old chart -helm uninstall datalake +# Uninstall old chart (if named "datalake" or other name) +helm uninstall # Install new chart -helm install warehouse13 ./warehouse13 +helm install warehouse13 ./warehouse13 --namespace warehouse13 --create-namespace # Or upgrade in place (if compatible) -helm upgrade datalake ./warehouse13 +helm upgrade ./warehouse13 ``` Note: Check your values.yaml configuration and update image repositories, resource limits, and other settings as needed. diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl deleted file mode 100644 index ecac6a9..0000000 --- a/helm/templates/_helpers.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "w13.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -*/}} -{{- define "w13.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "w13.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "w13.labels" -}} -helm.sh/chart: {{ include "w13.chart" . }} -{{ include "w13.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "w13.selectorLabels" -}} -app.kubernetes.io/name: {{ include "w13.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "w13.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "w13.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml deleted file mode 100644 index de12d5f..0000000 --- a/helm/templates/deployment.yaml +++ /dev/null @@ -1,111 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "w13.fullname" . }} - labels: - {{- include "w13.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "w13.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "w13.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "w13.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.service.targetPort }} - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: http - initialDelaySeconds: 30 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /health - port: http - initialDelaySeconds: 5 - periodSeconds: 5 - env: - - name: DATABASE_URL - valueFrom: - secretKeyRef: - name: {{ include "w13.fullname" . }}-secrets - key: database-url - - name: STORAGE_BACKEND - value: {{ .Values.config.storageBackend | quote }} - - name: MAX_UPLOAD_SIZE - value: {{ .Values.config.maxUploadSize | quote }} - {{- if eq .Values.config.storageBackend "s3" }} - - name: AWS_ACCESS_KEY_ID - valueFrom: - secretKeyRef: - name: {{ include "w13.fullname" . }}-secrets - key: aws-access-key-id - - name: AWS_SECRET_ACCESS_KEY - valueFrom: - secretKeyRef: - name: {{ include "w13.fullname" . }}-secrets - key: aws-secret-access-key - - name: AWS_REGION - value: {{ .Values.aws.region | quote }} - - name: S3_BUCKET_NAME - value: {{ .Values.aws.bucketName | quote }} - {{- else }} - - name: MINIO_ENDPOINT - value: "{{ include "w13.fullname" . }}-minio:9000" - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: {{ include "w13.fullname" . }}-secrets - key: minio-access-key - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: {{ include "w13.fullname" . }}-secrets - key: minio-secret-key - - name: MINIO_BUCKET_NAME - value: "test-artifacts" - - name: MINIO_SECURE - value: "false" - {{- end }} - {{- with .Values.env }} - {{- toYaml . | nindent 8 }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml deleted file mode 100644 index 30c1764..0000000 --- a/helm/templates/ingress.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: {{ include "datalake.fullname" . }} - labels: - {{- include "datalake.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if .Values.ingress.className }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - pathType: {{ .pathType }} - backend: - service: - name: {{ include "datalake.fullname" $ }} - port: - number: {{ $.Values.service.port }} - {{- end }} - {{- end }} -{{- end }} diff --git a/helm/templates/secrets.yaml b/helm/templates/secrets.yaml deleted file mode 100644 index d132fc1..0000000 --- a/helm/templates/secrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "datalake.fullname" . }}-secrets - labels: - {{- include "datalake.labels" . | nindent 4 }} -type: Opaque -stringData: - database-url: "postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ include "datalake.fullname" . }}-postgresql:5432/{{ .Values.postgresql.auth.database }}" - {{- if .Values.aws.enabled }} - aws-access-key-id: {{ .Values.aws.accessKeyId | quote }} - aws-secret-access-key: {{ .Values.aws.secretAccessKey | quote }} - {{- else }} - minio-access-key: {{ .Values.minio.rootUser | quote }} - minio-secret-key: {{ .Values.minio.rootPassword | quote }} - {{- end }} diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml deleted file mode 100644 index f23d030..0000000 --- a/helm/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "datalake.fullname" . }} - labels: - {{- include "datalake.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "datalake.selectorLabels" . | nindent 4 }} diff --git a/helm/templates/serviceaccount.yaml b/helm/templates/serviceaccount.yaml deleted file mode 100644 index 2e7472b..0000000 --- a/helm/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "datalake.serviceAccountName" . }} - labels: - {{- include "datalake.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/helm/values.yaml b/helm/values.yaml deleted file mode 100644 index 8668226..0000000 --- a/helm/values.yaml +++ /dev/null @@ -1,111 +0,0 @@ -replicaCount: 1 - -image: - repository: w13 - pullPolicy: IfNotPresent - tag: "latest" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - create: true - annotations: {} - name: "" - -podAnnotations: {} - -podSecurityContext: - fsGroup: 1000 - -securityContext: - capabilities: - drop: - - ALL - readOnlyRootFilesystem: false - runAsNonRoot: true - runAsUser: 1000 - -service: - type: ClusterIP - port: 8000 - targetPort: 8000 - -ingress: - enabled: false - className: "" - annotations: {} - hosts: - - host: w13.local - paths: - - path: / - pathType: Prefix - tls: [] - -resources: - limits: - cpu: 1000m - memory: 1Gi - requests: - cpu: 500m - memory: 512Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 10 - targetCPUUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -# Application configuration -config: - storageBackend: minio # or "s3" - maxUploadSize: 524288000 # 500MB - -# PostgreSQL configuration -postgresql: - enabled: true - auth: - username: user - password: password - database: w13 - primary: - persistence: - enabled: true - size: 10Gi - -# MinIO configuration (for self-hosted storage) -minio: - enabled: true - mode: standalone - rootUser: minioadmin - rootPassword: minioadmin - persistence: - enabled: true - size: 50Gi - service: - type: ClusterIP - port: 9000 - consoleService: - port: 9001 - -# AWS S3 configuration (when using AWS) -aws: - enabled: false - accessKeyId: "" - secretAccessKey: "" - region: us-east-1 - bucketName: test-artifacts - -# Environment variables -env: - - name: API_HOST - value: "0.0.0.0" - - name: API_PORT - value: "8000" diff --git a/helm/warehouse13/README.md b/helm/warehouse13/README.md index eaf0701..c36633d 100644 --- a/helm/warehouse13/README.md +++ b/helm/warehouse13/README.md @@ -328,10 +328,10 @@ kubectl delete pvc -l app.kubernetes.io/instance=my-warehouse13 ```bash # Create backup -kubectl exec -it warehouse13-postgres-0 -- pg_dump -U user datalake > backup.sql +kubectl exec -it warehouse13-postgres-0 -- pg_dump -U user warehouse13 > backup.sql # Restore -kubectl exec -i warehouse13-postgres-0 -- psql -U user datalake < backup.sql +kubectl exec -i warehouse13-postgres-0 -- psql -U user warehouse13 < backup.sql ``` ### MinIO Backup diff --git a/helm/warehouse13/values.yaml b/helm/warehouse13/values.yaml index 6ca45a2..cac5f04 100644 --- a/helm/warehouse13/values.yaml +++ b/helm/warehouse13/values.yaml @@ -16,7 +16,7 @@ postgres: auth: username: user password: password - database: datalake + database: warehouse13 persistence: enabled: true size: 10Gi @@ -70,7 +70,7 @@ app: pullPolicy: always replicas: 2 env: - databaseUrl: "postgresql://user:password@warehouse13-postgres:5432/datalake" + databaseUrl: "postgresql://user:password@warehouse13-postgres:5432/warehouse13" storageBackend: "minio" minioEndpoint: "warehouse13-minio:9000" resources: