Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solved #35

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .infrastructure/app/clusterIp.yml

This file was deleted.

7 changes: 0 additions & 7 deletions .infrastructure/app/configMap.yml

This file was deleted.

104 changes: 0 additions & 104 deletions .infrastructure/app/deployment.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .infrastructure/app/hpa.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .infrastructure/app/nodeport.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .infrastructure/app/pvc.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .infrastructure/app/secret.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .infrastructure/helm-chart/todoapp/.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/
8 changes: 8 additions & 0 deletions .infrastructure/helm-chart/todoapp/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v2
name: todoapp
description: Todoapp server Helm chart
type: application
version: 0.1.0
appVersion: "1.16.0"
dependencies:
- name: mysql
Comment on lines +7 to +8

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to specify the repository URL for the MySQL dependency. Add a repository field under the mysql dependency to indicate where Helm can find this chart.

23 changes: 23 additions & 0 deletions .infrastructure/helm-chart/todoapp/charts/mysql/.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/
6 changes: 6 additions & 0 deletions .infrastructure/helm-chart/todoapp/charts/mysql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: mysql
description: MySQL DB
type: application
version: 0.1.0
appVersion: "1.16.0"
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql
namespace: mysql
name: {{ .Chart.Name }}-config
namespace: {{ .Values.common.namespace }}
labels:
app: mysql
app: {{ .Values.mysql.labelName }}
data:
init.sql: |
GRANT ALL PRIVILEGES ON app_db.* TO 'app_user'@'%';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: todoapp
name: {{ .Values.common.namespace }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ .Chart.Name }}-secret
namespace: {{ .Values.common.namespace }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that .Values.common.namespace is defined in your values.yaml file. If it's not set, the Secret might not be created in the intended namespace.

type: Opaque
data:
{{- range $k, $v := .Values.secret }}
{{ $k }}: {{ $v | b64enc | quote }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Headless service for stable DNS entries of StatefulSet members.
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: mysql
name: {{ .Chart.Name }}-service
namespace: {{ .Values.common.namespace }}
spec:
selector:
app: mysql
app: {{ .Values.mysql.labelName }}
ports:
- name: mysql
port: 3306
Expand Down
Loading
Loading