Skip to content

Commit

Permalink
Merge pull request #673 from syedsalman3753/1.1.5
Browse files Browse the repository at this point in the history
[DSD-5198] Added mosip-file-server
  • Loading branch information
ckm007 authored May 7, 2024
2 parents e443364 + 648cc8b commit 4013e0b
Show file tree
Hide file tree
Showing 23 changed files with 1,036 additions and 147 deletions.
3 changes: 0 additions & 3 deletions .github/ct.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/chart-lint-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Validate / Publish helm charts

on:
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
inputs:
IGNORE_CHARTS:
description: 'Provide list of charts to be ignored separated by pipe(|)'
required: false
default: '""'
type: string
CHART_PUBLISH:
description: 'Chart publishing to gh-pages branch'
required: false
default: 'NO'
type: string
options:
- YES
- NO
INCLUDE_ALL_CHARTS:
description: 'Include all charts for Linting/Publishing (YES/NO)'
required: false
default: 'NO'
type: string
options:
- YES
- NO
push:
branches:
- '!release-branch'
- master
- 1.*
- develop
- MOSIP*
- release*
paths:
- 'charts/**'

jobs:
chart-lint-publish:
uses: mosip/kattu/.github/workflows/chart-lint-publish.yml@master
with:
CHARTS_DIR: charts
CHARTS_URL: https://mosip.github.io/mosip-helm
REPOSITORY: mosip-helm
BRANCH: gh-pages
INCLUDE_ALL_CHARTS: "${{ inputs.INCLUDE_ALL_CHARTS || 'NO' }}"
IGNORE_CHARTS: "${{ inputs.IGNORE_CHARTS ||'\"\"' }}"
CHART_PUBLISH: "${{ inputs.CHART_PUBLISH || 'YES' }}"
LINTING_CHART_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-schema.yaml"
LINTING_LINTCONF_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/lintconf.yaml"
LINTING_CHART_TESTING_CONFIG_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-testing-config.yaml"
LINTING_HEALTH_CHECK_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/health-check-schema.yaml"
secrets:
TOKEN: ${{ secrets.ACTION_PAT }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
42 changes: 0 additions & 42 deletions .github/workflows/helm-lint.yaml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/push_trigger.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/release.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
charts/*/Chart.lock
charts/*/charts
1 change: 1 addition & 0 deletions charts/mosip-file-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
charts/
21 changes: 21 additions & 0 deletions charts/mosip-file-server/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
20 changes: 20 additions & 0 deletions charts/mosip-file-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v2
name: mosip-file-server
description: A Helm chart to file server application.
type: application
version: 1.1.5
appVersion: ""
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
home: https://mosip.io
keywords:
- mosip
- mosip-file-server
- fileserver
maintainers:
- email: [email protected]
name: MOSIP
11 changes: 11 additions & 0 deletions charts/mosip-file-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# MOSIP File Server

Helm chart for installing for file server.

## Install

```console
$ helm repo add mosip https://mosip.github.io
$ helm install my-release mosip/mosip-file-server
```

1 change: 1 addition & 0 deletions charts/mosip-file-server/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

58 changes: 58 additions & 0 deletions charts/mosip-file-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{{/*
Return the proper image name
*/}}
{{- define "mosipfileserver.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{- end -}}

{{/*
Return the proper image name (for the init container volume-permissions image)
*/}}
{{- define "mosipfileserver.volumePermissions.image" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissions.image "global" .Values.global ) -}}
{{- end -}}

{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "mosipfileserver.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.volumePermissions.image) "global" .Values.global) -}}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "mosipfileserver.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (printf "%s-foo" (include "common.names.fullname" .)) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Compile all warnings into a single message.
*/}}
{{- define "mosipfileserver.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "mosipfileserver.validateValues.foo" .) -}}
{{- $messages := append $messages (include "mosipfileserver.validateValues.bar" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}

{{- if $message -}}
{{- printf "\nVALUES VALIDATION:\n%s" $message -}}
{{- end -}}
{{- end -}}

{{/*
Return podAnnotations
*/}}
{{- define "mosipfileserver.podAnnotations" -}}
{{- if .Values.podAnnotations }}
{{ include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) }}
{{- end }}
{{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }}
{{ include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) }}
{{- end }}
{{- end -}}
19 changes: 19 additions & 0 deletions charts/mosip-file-server/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ template "common.names.fullname" . }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "common.names.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "mosipfileserver.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
41 changes: 41 additions & 0 deletions charts/mosip-file-server/templates/configmaps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: wellknown-cm
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}

data:
public-key.json: |-
{
"@context": "https://w3id.org/security/v2",
"type": "RsaVerificationKey2018",
"id": "https://{{ .Values.mosipfileserver.host }}/.well-known/public-key.json",
"controller": "https://{{ .Values.mosipfileserver.host }}/.well-known/controller.json",
"publicKeyPem": "replace-public-key"
}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
{{- end }}
data:
{{- if .Values.mosipfileserver.configmaps }}
{{- range $key, $value := .Values.mosipfileserver.configmaps }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
Loading

0 comments on commit 4013e0b

Please sign in to comment.