Add voting deadline function
This commit is contained in:
@@ -358,3 +358,6 @@ For issues and questions:
|
||||
3. Consult the Helm chart documentation
|
||||
4. Create an issue in the repository
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -238,3 +238,6 @@ The chart includes basic health checks. For production deployments, consider add
|
||||
|
||||
For issues and questions, please refer to the application documentation or create an issue in the repository.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -255,3 +255,6 @@ main() {
|
||||
# Run main function
|
||||
main "$@"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -64,3 +64,6 @@ Create the name of the service account to use
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -37,7 +37,14 @@ data:
|
||||
"aws_secret_access_key": "",
|
||||
"aws_region": "{{ .Values.s3.region }}",
|
||||
"bucket_name": "{{ .Values.s3.bucket }}",
|
||||
"bucket_prefix": "{{ .Values.s3.bucketPrefix }}",
|
||||
"endpoint_url": "{{ .Values.s3.endpoint }}",
|
||||
"use_ssl": true,
|
||||
"storage_provider": "{{ .Values.s3.storageProvider }}",
|
||||
"minio_endpoint": "{{ .Values.s3.endpoint }}",
|
||||
"minio_use_ssl": {{ .Values.s3.useSSL }},
|
||||
"use_signed_urls": {{ .Values.s3.useSignedUrls }},
|
||||
"signed_url_expiry": {{ .Values.s3.signedUrlExpiry }},
|
||||
"fallback_to_static": {{ .Values.s3.fallbackToStatic }},
|
||||
"use_ssl": {{ .Values.s3.useSSL }},
|
||||
"verify_ssl": true
|
||||
}
|
||||
|
||||
@@ -58,26 +58,55 @@ spec:
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.secrets.useExternalSecret }}
|
||||
name: {{ .Values.secrets.externalSecretName | quote }}
|
||||
{{- else }}
|
||||
name: {{ include "motm-app.fullname" . }}-secrets
|
||||
key: db-password
|
||||
# S3 configuration
|
||||
{{- end }}
|
||||
key: {{ .Values.secrets.dbPasswordKey }}
|
||||
# S3/MinIO configuration
|
||||
{{- if .Values.s3.enabled }}
|
||||
- name: S3_ENABLED
|
||||
value: "true"
|
||||
- name: S3_STORAGE_PROVIDER
|
||||
value: {{ .Values.s3.storageProvider | quote }}
|
||||
- name: S3_ENDPOINT
|
||||
value: {{ .Values.s3.endpoint | quote }}
|
||||
- name: S3_REGION
|
||||
value: {{ .Values.s3.region | quote }}
|
||||
- name: S3_BUCKET
|
||||
value: {{ .Values.s3.bucket | quote }}
|
||||
- name: S3_BUCKET_PREFIX
|
||||
value: {{ .Values.s3.bucketPrefix | quote }}
|
||||
- name: S3_USE_SIGNED_URLS
|
||||
value: {{ .Values.s3.useSignedUrls | quote }}
|
||||
- name: S3_SIGNED_URL_EXPIRY
|
||||
value: {{ .Values.s3.signedUrlExpiry | quote }}
|
||||
- name: S3_FALLBACK_TO_STATIC
|
||||
value: {{ .Values.s3.fallbackToStatic | quote }}
|
||||
- name: S3_USE_SSL
|
||||
value: {{ .Values.s3.useSSL | quote }}
|
||||
- name: S3_ACCESS_KEY_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.secrets.useExternalSecret }}
|
||||
name: {{ .Values.secrets.externalSecretName | quote }}
|
||||
{{- else }}
|
||||
name: {{ include "motm-app.fullname" . }}-secrets
|
||||
key: s3-access-key
|
||||
{{- end }}
|
||||
key: {{ .Values.secrets.s3AccessKeyKey }}
|
||||
- name: S3_SECRET_ACCESS_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
{{- if .Values.secrets.useExternalSecret }}
|
||||
name: {{ .Values.secrets.externalSecretName | quote }}
|
||||
{{- else }}
|
||||
name: {{ include "motm-app.fullname" . }}-secrets
|
||||
key: s3-secret-key
|
||||
{{- end }}
|
||||
key: {{ .Values.secrets.s3SecretKeyKey }}
|
||||
{{- else }}
|
||||
- name: S3_ENABLED
|
||||
value: "false"
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
|
||||
@@ -31,3 +31,6 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -17,3 +17,6 @@ spec:
|
||||
{{- include "motm-app.selectorLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,3 +20,6 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- if not .Values.secrets.useExternalSecret }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
@@ -8,23 +9,24 @@ type: Opaque
|
||||
data:
|
||||
# Database password
|
||||
{{- if .Values.secrets.dbPassword }}
|
||||
db-password: {{ .Values.secrets.dbPassword | b64enc | quote }}
|
||||
{{ .Values.secrets.dbPasswordKey }}: {{ .Values.secrets.dbPassword | b64enc | quote }}
|
||||
{{- else }}
|
||||
db-password: {{ "changeme" | b64enc | quote }}
|
||||
{{ .Values.secrets.dbPasswordKey }}: {{ "changeme" | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.s3.enabled }}
|
||||
# S3 credentials
|
||||
{{- if .Values.secrets.s3AccessKey }}
|
||||
s3-access-key: {{ .Values.secrets.s3AccessKey | b64enc | quote }}
|
||||
{{ .Values.secrets.s3AccessKeyKey }}: {{ .Values.secrets.s3AccessKey | b64enc | quote }}
|
||||
{{- else }}
|
||||
s3-access-key: {{ "changeme" | b64enc | quote }}
|
||||
{{ .Values.secrets.s3AccessKeyKey }}: {{ "changeme" | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.secrets.s3SecretKey }}
|
||||
s3-secret-key: {{ .Values.secrets.s3SecretKey | b64enc | quote }}
|
||||
{{ .Values.secrets.s3SecretKeyKey }}: {{ .Values.secrets.s3SecretKey | b64enc | quote }}
|
||||
{{- else }}
|
||||
s3-secret-key: {{ "changeme" | b64enc | quote }}
|
||||
{{ .Values.secrets.s3SecretKeyKey }}: {{ "changeme" | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
@@ -11,3 +11,6 @@ metadata:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -71,12 +71,26 @@ database:
|
||||
name: "motm_dev"
|
||||
username: "motm_user"
|
||||
|
||||
# S3 Configuration for Development
|
||||
# S3/MinIO Configuration for Development
|
||||
# Example: Using MinIO for local development
|
||||
s3:
|
||||
enabled: true
|
||||
endpoint: "https://s3.amazonaws.com"
|
||||
region: "us-east-1"
|
||||
storageProvider: "minio" # Use MinIO for development
|
||||
endpoint: "http://minio.default.svc.cluster.local:9000" # Internal MinIO service
|
||||
region: "us-east-1" # MinIO ignores this but required for boto3
|
||||
bucket: "motm-assets-dev"
|
||||
bucketPrefix: "assets/"
|
||||
useSignedUrls: false # Use public URLs in development
|
||||
signedUrlExpiry: 3600
|
||||
fallbackToStatic: true
|
||||
useSSL: false # HTTP for local MinIO
|
||||
|
||||
# Alternative AWS S3 configuration for development:
|
||||
# storageProvider: "aws"
|
||||
# endpoint: ""
|
||||
# region: "us-east-1"
|
||||
# bucket: "motm-assets-dev"
|
||||
# useSSL: true
|
||||
|
||||
# Environment Variables for Development
|
||||
env:
|
||||
|
||||
@@ -79,12 +79,26 @@ database:
|
||||
name: "motm_prod"
|
||||
username: "motm_user"
|
||||
|
||||
# S3 Configuration for Production
|
||||
# S3/MinIO Configuration for Production
|
||||
s3:
|
||||
enabled: true
|
||||
endpoint: "https://s3.amazonaws.com"
|
||||
region: "us-east-1"
|
||||
bucket: "motm-assets-prod"
|
||||
storageProvider: "minio" # Use "aws" for AWS S3 or "minio" for MinIO
|
||||
endpoint: "http://minio.default.svc.cluster.local:9000" # MinIO internal service endpoint
|
||||
region: "us-east-1" # Required for boto3 even with MinIO
|
||||
bucket: "hockey-apps"
|
||||
bucketPrefix: "assets/"
|
||||
useSignedUrls: false # Use public URLs (MinIO bucket should be public read)
|
||||
signedUrlExpiry: 3600
|
||||
fallbackToStatic: true
|
||||
useSSL: false # Use HTTP for internal cluster communication
|
||||
|
||||
# Alternative external MinIO configuration (for external access):
|
||||
# storageProvider: "minio"
|
||||
# endpoint: "https://minio.yourdomain.com" # External MinIO endpoint
|
||||
# region: "us-east-1"
|
||||
# bucket: "hockey-apps"
|
||||
# useSignedUrls: false
|
||||
# useSSL: true # Use HTTPS for external access
|
||||
|
||||
# Environment Variables
|
||||
env:
|
||||
|
||||
@@ -113,15 +113,44 @@ database:
|
||||
# Password should be set via secret
|
||||
# password: ""
|
||||
|
||||
# S3 Configuration
|
||||
# S3/MinIO Configuration
|
||||
s3:
|
||||
# Enable S3 storage (if false, uses local static files)
|
||||
enabled: true
|
||||
endpoint: "https://s3.amazonaws.com"
|
||||
|
||||
# Storage provider: "aws" or "minio"
|
||||
storageProvider: "minio"
|
||||
|
||||
# S3/MinIO endpoint
|
||||
# For AWS: "https://s3.amazonaws.com" or leave empty to use default
|
||||
# For MinIO: "https://minio.example.com" or "http://minio.default.svc.cluster.local:9000"
|
||||
endpoint: "http://minio.default.svc.cluster.local:9000"
|
||||
|
||||
# AWS region (used for AWS S3, required for boto3 even with MinIO)
|
||||
region: "us-east-1"
|
||||
bucket: "motm-assets"
|
||||
|
||||
# S3 bucket name
|
||||
bucket: "hockey-apps"
|
||||
|
||||
# Bucket prefix/folder for assets (e.g., "assets/", "motm/", etc.)
|
||||
bucketPrefix: "assets/"
|
||||
|
||||
# Use signed URLs for asset access (recommended for private buckets)
|
||||
useSignedUrls: false
|
||||
|
||||
# Signed URL expiry time in seconds (default: 1 hour)
|
||||
signedUrlExpiry: 3600
|
||||
|
||||
# Fallback to local static files if S3 access fails
|
||||
fallbackToStatic: true
|
||||
|
||||
# SSL/TLS configuration
|
||||
useSSL: false
|
||||
|
||||
# Credentials (should be set via secrets in production)
|
||||
# These are ignored if secrets.useExternalSecret is true
|
||||
accessKeyId: ""
|
||||
secretAccessKey: ""
|
||||
# These should be set via secret
|
||||
|
||||
# Environment Variables
|
||||
env:
|
||||
@@ -150,8 +179,20 @@ configMap:
|
||||
database = {{ .Values.database.name }}
|
||||
username = {{ .Values.database.username }}
|
||||
|
||||
# Secrets
|
||||
# Secrets Configuration
|
||||
secrets:
|
||||
# Use an existing external secret instead of creating one
|
||||
# If useExternalSecret is true, the chart will reference the external secret
|
||||
# If false, the chart will create a secret with the provided values
|
||||
useExternalSecret: false
|
||||
externalSecretName: "" # Name of the existing secret to reference
|
||||
|
||||
# Secret key names (used for both external and managed secrets)
|
||||
dbPasswordKey: "db-password"
|
||||
s3AccessKeyKey: "s3-access-key"
|
||||
s3SecretKeyKey: "s3-secret-key"
|
||||
|
||||
# Values for managed secret (only used when useExternalSecret is false)
|
||||
# Database password
|
||||
dbPassword: ""
|
||||
# S3 credentials
|
||||
|
||||
Reference in New Issue
Block a user