Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#7 from eclipse-tractusx/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
nicoprow authored Dec 16, 2022
2 parents 134cc13 + 0fd5ed3 commit 1d75038
Show file tree
Hide file tree
Showing 21 changed files with 966 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/initdb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: MIW Init DB

on:
push:
paths:
# this workflow file
- '.github/workflows/initdb.yml'
# Docker files
- 'docker/Dockerfile.import'
# sqls
- 'initdb/**'
branches:
- main
workflow_dispatch:

jobs:
build:
# name of the job starts with a "run-level" subordinate to the workflow such that we can
# depend on them in order to implement workflow dependencies
name: miw-initdb image built
runs-on: ubuntu-latest
# rely on the first job
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}_initdb

steps:
# Get the latest sources
- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push KeyCloak custom images for central and shared idp instances
- name: 'Build images'
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile.import
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions charts/chart-testing-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
validate-maintainers: false
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami
2 changes: 2 additions & 0 deletions charts/managed-identity-wallets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Chart.lock
charts/
23 changes: 23 additions & 0 deletions charts/managed-identity-wallets/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
31 changes: 31 additions & 0 deletions charts/managed-identity-wallets/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v2
name: managed-identity-wallets
description: Managed Identity Wallets Service

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.18
appVersion: 2.1.1

dependencies:
- name: postgresql
version: 11.x.x
repository: https://charts.bitnami.com/bitnami
condition: acapypostgresql.enabled
alias: acapypostgresql
- name: postgresql
version: 11.x.x
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
alias: postgresql
22 changes: 22 additions & 0 deletions charts/managed-identity-wallets/argocd/appsetup-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: managed-identity-wallets
spec:
destination:
namespace: product-managed-identity-wallets
server: 'https://kubernetes.default.svc'
source:
repoURL: 'https://github.com/catenax-ng/product-core-managed-identity-wallets.git'
path: helm/managed-identity-wallets
targetRevision: develop
helm:
valueFiles:
- values.yaml
- values-dev.yaml
plugin:
name: argocd-vault-plugin-helm
env:
- name: AVP_SECRET
value: vault-secret
project: project-managed-identity-wallets
22 changes: 22 additions & 0 deletions charts/managed-identity-wallets/argocd/appsetup-int.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: managed-identity-wallets
spec:
destination:
namespace: product-managed-identity-wallets
server: 'https://kubernetes.default.svc'
source:
repoURL: 'https://github.com/catenax-ng/product-core-managed-identity-wallets.git'
path: helm/managed-identity-wallets
targetRevision: main
helm:
valueFiles:
- values.yaml
- values-int.yaml
plugin:
name: argocd-vault-plugin-helm
env:
- name: AVP_SECRET
value: vault-secret
project: project-managed-identity-wallets
82 changes: 82 additions & 0 deletions charts/managed-identity-wallets/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "managed-identity-wallets.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "managed-identity-wallets.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 "managed-identity-wallets.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "managed-identity-wallets.labels" -}}
helm.sh/chart: {{ include "managed-identity-wallets.chart" . }}
{{ include "managed-identity-wallets.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "managed-identity-wallets.selectorLabels" -}}
app.kubernetes.io/name: {{ include "managed-identity-wallets.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Invoke include on given definition with postgresql dependency context
Usage: include "acapyPostgresContext" (list $ "your_include_function_here")
*/}}
{{- define "acapyPostgresContext" -}}
{{- $ := index . 0 }}
{{- $function := index . 1 }}
{{- include $function (dict "Values" $.Values.acapypostgresql "Chart" (dict "Name" "acapypostgresql") "Release" $.Release) }}
{{- end }}

{{/*
Invoke include on given definition with postgresql dependency context
Usage: include "postgresContext" (list $ "your_include_function_here")
*/}}
{{- define "postgresContext" -}}
{{- $ := index . 0 }}
{{- $function := index . 1 }}
{{- include $function (dict "Values" $.Values.postgresql "Chart" (dict "Name" "postgresql") "Release" $.Release) }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "managed-identity-wallets.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "managed-identity-wallets.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Loading

0 comments on commit 1d75038

Please sign in to comment.