-
Notifications
You must be signed in to change notification settings - Fork 0
Use S3Proxy to access object storage so we can swap out cloud storage engines #29
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
aec4ea8
working for aws and azure, gcp next
chrisghill 1b507d4
GCS seems to be working
chrisghill 3b04b48
convert to a secret
chrisghill 13652fe
add log levels back, cleanup comments
chrisghill d13f6b4
final updates to values - everything tested and working
chrisghill bf7d3ad
final changes
chrisghill File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,63 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ include "massdriver.fullname" . }}-s3proxy | ||
| labels: | ||
| {{- include "massdriver.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: s3proxy | ||
| spec: | ||
| replicas: 2 | ||
chrisghill marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| selector: | ||
| matchLabels: | ||
| {{- include "massdriver.selectorLabels" . | nindent 6 }} | ||
| app.kubernetes.io/component: s3proxy | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| secret.s3proxy-config/checksum: {{ include (print $.Template.BasePath "/s3proxy/secret-envs.yaml") . | sha256sum }} | ||
| labels: | ||
| {{- include "massdriver.labels" . | nindent 8 }} | ||
| app.kubernetes.io/component: s3proxy | ||
| spec: | ||
| serviceAccountName: {{ include "massdriver.fullname" . }}-s3proxy | ||
| containers: | ||
| - name: s3proxy | ||
| image: "andrewgaul/s3proxy:3.0.0" | ||
chrisghill marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| imagePullPolicy: IfNotPresent | ||
| ports: | ||
| - name: http | ||
| containerPort: 8080 | ||
| protocol: TCP | ||
| livenessProbe: | ||
| tcpSocket: | ||
| port: http | ||
| initialDelaySeconds: 30 | ||
| periodSeconds: 10 | ||
| timeoutSeconds: 5 | ||
| failureThreshold: 3 | ||
| readinessProbe: | ||
| tcpSocket: | ||
| port: http | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 5 | ||
| timeoutSeconds: 3 | ||
| failureThreshold: 3 | ||
chrisghill marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| resources: | ||
| limits: | ||
| cpu: 500m | ||
| memory: 512Mi | ||
| requests: | ||
| cpu: 100m | ||
| memory: 128Mi | ||
chrisghill marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| envFrom: | ||
| - secretRef: | ||
| name: {{ include "massdriver.fullname" . }}-s3proxy-envs | ||
| securityContext: | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| readOnlyRootFilesystem: false | ||
| runAsNonRoot: true | ||
| runAsUser: 65534 | ||
| securityContext: | ||
| fsGroup: 65534 | ||
chrisghill marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or 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,62 @@ | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ include "massdriver.fullname" . }}-s3proxy-envs | ||
| labels: | ||
| {{- include "massdriver.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: s3proxy | ||
| type: Opaque | ||
| stringData: | ||
| # S3Proxy configuration | ||
| S3PROXY_ENDPOINT: "http://0.0.0.0:8080" | ||
| S3PROXY_AUTHORIZATION: "aws-v2-or-v4" | ||
chrisghill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| S3PROXY_IDENTITY: {{ .Values.massdriver.blobStorage.username | quote }} | ||
| S3PROXY_CREDENTIAL: {{ .Values.massdriver.blobStorage.password | quote }} | ||
| S3PROXY_VIRTUALHOST: "" | ||
| S3PROXY_IGNORE_UNKNOWN_HEADERS: "true" | ||
| S3PROXY_CORS_ALLOW_ALL: "false" | ||
|
|
||
| # Logging configuration for debugging | ||
| LOG_LEVEL: {{ .Values.massdriver.blobStorage.logLevel | quote }} | ||
| JETTY_LOG_LEVEL: {{ .Values.massdriver.blobStorage.logLevel | quote }} | ||
|
|
||
| # JClouds HTTP client performance optimizations (applies to all providers) | ||
| JCLOUDS_CONNECTION_TIMEOUT: "5000" | ||
| JCLOUDS_SO_TIMEOUT: "10000" | ||
chrisghill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| JCLOUDS_MAX_CONNECTIONS: "200" | ||
| JCLOUDS_MAX_CONNECTIONS_PER_ROUTE: "20" | ||
chrisghill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {{- if eq .Values.massdriver.blobStorage.type "minio" }} | ||
| # MinIO backend configuration (using S3 provider) | ||
| JCLOUDS_PROVIDER: "aws-s3" | ||
| JCLOUDS_IDENTITY: {{ .Values.massdriver.blobStorage.minio.username | quote }} | ||
| JCLOUDS_CREDENTIAL: {{ .Values.massdriver.blobStorage.minio.password | quote }} | ||
| JCLOUDS_ENDPOINT: "http://{{ include "massdriver.fullname" . }}-minio.{{ .Release.Namespace }}.svc:{{ toString .Values.minio.service.port }}" | ||
| {{- else if eq .Values.massdriver.blobStorage.type "s3" }} | ||
| # AWS S3 Configuration | ||
| JCLOUDS_PROVIDER: "aws-s3" | ||
| JCLOUDS_IDENTITY: {{ .Values.massdriver.blobStorage.s3.accessKeyId | quote }} | ||
| JCLOUDS_CREDENTIAL: {{ .Values.massdriver.blobStorage.s3.secretAccessKey | quote }} | ||
chrisghill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| JCLOUDS_ENDPOINT: "{{ printf "https://s3.%s.amazonaws.com" .Values.massdriver.blobStorage.s3.region }}" | ||
| JCLOUDS_REGION: {{ .Values.massdriver.blobStorage.s3.region | quote }} | ||
chrisghill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {{- else if eq .Values.massdriver.blobStorage.type "gcs" }} | ||
| # Google Cloud Storage Configuration | ||
| JCLOUDS_PROVIDER: "google-cloud-storage" | ||
| JCLOUDS_IDENTITY: {{ .Values.massdriver.blobStorage.gcs.serviceAccountEmail | quote }} | ||
| JCLOUDS_CREDENTIAL: {{ .Values.massdriver.blobStorage.gcs.privateKey | quote }} | ||
| JCLOUDS_ENDPOINT: "https://storage.googleapis.com" | ||
| {{- else if eq .Values.massdriver.blobStorage.type "azureblob" }} | ||
| # Azure Blob Storage Configuration | ||
| JCLOUDS_PROVIDER: "azureblob-sdk" | ||
chrisghill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| JCLOUDS_ENDPOINT: "https://{{ .Values.massdriver.blobStorage.azureblob.storageAccountName }}.blob.core.windows.net" | ||
| {{- if not (empty .Values.massdriver.blobStorage.azureblob.storageAccountKey) }} | ||
| JCLOUDS_IDENTITY: {{ .Values.massdriver.blobStorage.azureblob.storageAccountName | quote }} | ||
| JCLOUDS_CREDENTIAL: {{ .Values.massdriver.blobStorage.azureblob.storageAccountKey | quote }} | ||
| {{- else }} | ||
| JCLOUDS_IDENTITY: "" | ||
| JCLOUDS_CREDENTIAL: "" | ||
chrisghill marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| AZURE_TENANT_ID: {{ .Values.massdriver.blobStorage.azureblob.tenantId | quote }} | ||
| AZURE_CLIENT_ID: {{ .Values.massdriver.blobStorage.azureblob.clientId | quote }} | ||
| AZURE_CLIENT_SECRET: {{ .Values.massdriver.blobStorage.azureblob.clientSecret | quote }} | ||
| {{- end }} | ||
| {{- end }} | ||
This file contains hidden or 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,17 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: {{ include "massdriver.fullname" . }}-s3proxy | ||
| labels: | ||
| {{- include "massdriver.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: s3proxy | ||
| spec: | ||
| type: ClusterIP | ||
| ports: | ||
| - port: 80 | ||
| targetPort: http | ||
| protocol: TCP | ||
| name: http | ||
| selector: | ||
| {{- include "massdriver.selectorLabels" . | nindent 4 }} | ||
| app.kubernetes.io/component: s3proxy |
This file contains hidden or 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,12 @@ | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
| name: {{ include "massdriver.fullname" . }}-s3proxy | ||
| labels: | ||
| {{- include "massdriver.labels" . | nindent 4 }} | ||
| app.kubernetes.io/component: s3proxy | ||
| {{- with .Values.massdriver.blobStorage.annotations }} | ||
| annotations: | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| automountServiceAccountToken: true |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.