Open yusufatmc opened 2 years ago
kind: ConfigMap apiVersion: v1 metadata: name: angus-endpoints namespace: default labels: app.kubernetes.io/name: angus-endpoints data: endpoints-client.json: | [ { ... "azureSettings": { "container": "files", "storageUrl": "https://nodejs4001", "token": "?token=TOKEN&se=2023-02-26T15:10:47Z" } } ] --- kind: Deployment apiVersion: apps/v1 metadata: name: file-uploader namespace: default labels: k8s-app: file-uploader spec: replicas: 1 selector: matchLabels: k8s-app: file-uploader template: metadata: name: file-uploader creationTimestamp: null labels: k8s-app: file-uploader spec: volumes: - name: files persistentVolumeClaim: claimName: file-uploader containers: - name: file-uploader image: ghcr.io/travelaps/file-uploader:v3 env: - name: TRUSTED_ORIGINS value: '["https://nodejs4001"]' - name: TRUSTED_IPS value: '["*"]' - name: ALLOWED_FILETYPES value: '["*"]' - name: ALLOWED_TOKENS value: '["TOKEN"]' resources: {} volumeMounts: - name: files mountPath: /app/uploads/files/ terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent securityContext: privileged: false restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst securityContext: {} imagePullSecrets: - name: regcred schedulerName: default-scheduler strategy: type: Recreate revisionHistoryLimit: 10 progressDeadlineSeconds: 600 --- kind: Service apiVersion: v1 metadata: name: file-uploader namespace: default labels: k8s-app: file-uploader spec: ports: - name: http protocol: TCP port: 80 targetPort: 80 selector: k8s-app: file-uploader type: ClusterIP sessionAffinity: None --- kind: Ingress apiVersion: networking.k8s.io/v1 metadata: name: file-uploader-ingress namespace: default annotations: kubernetes.io/ingress.class: public nginx.ingress.kubernetes.io/cors-allow-credentials: 'true' nginx.ingress.kubernetes.io/cors-allow-headers: >- DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,x-ms-blob-content-md5,x-ms-blob-content-type,x-ms-blob-type,x-ms-client-request-id,x-ms-date,x-ms-version nginx.ingress.kubernetes.io/cors-allow-methods: GET, POST, OPTIONS, PUT nginx.ingress.kubernetes.io/cors-allow-origin: '*' nginx.ingress.kubernetes.io/cors-max-age: '600' nginx.ingress.kubernetes.io/enable-cors: 'true' nginx.ingress.kubernetes.io/proxy-body-size: 30m nginx.ingress.kubernetes.io/proxy-read-timeout: '600' nginx.ingress.kubernetes.io/server-snippet: | gunzip on; gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 5; gzip_min_length 512; gzip_buffers 16 128k; gzip_types *; nginx.ingress.kubernetes.io/ssl-redirect: 'false' spec: tls: - hosts: - nodejs4001 secretName: nodejs4001-cert rules: - host: nodejs4001 http: paths: - path: /files pathType: ImplementationSpecific backend: service: name: file-uploader port: number: 80