k8s: helm manifest
All checks were successful
Go / build (push) Successful in 11m49s

This commit is contained in:
vitaliy 2025-11-13 15:41:24 +03:00
parent a3898a7822
commit 7825ac6a05
12 changed files with 114 additions and 0 deletions

3
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

8
.idea/go_simple.iml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

4
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/go_simple.iml" filepath="$PROJECT_DIR$/.idea/go_simple.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

21
helm/Chart.yaml Normal file
View File

@ -0,0 +1,21 @@
apiVersion: v2
name: helloworld
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.
version: 1.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.0.0

View File

@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: go_hello
labels:
app: go_hello
spec:
replicas: {{ .values.replicaCount }}
selector:
matchLabels:
app: go_hello
template:
metadata:
labels:
app: go_hello
spec:
containers:
- name: go_hello
image: "git.gocommunity.ru/go-hello:{{ .Chart.AppVersion }}"
ports:
- containerPort: 8080

View File

@ -0,0 +1,20 @@
{{- if .values.ingress.enabled -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: helloworld
namespace: default
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/group.name: default
alb.ingress.kubernetes.io/target-type: ip
spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: helloworld
servicePort: 80
{{- end -}}

View File

@ -0,0 +1,12 @@
kind: Service
apiVersion: v1
metadata:
name: go_hello_service
labels:
app: go_hello_service
spec:
selector:
app: go_hello
ports:
- port: 81
targetPort: 8080

1
helm/values.dev.yaml Normal file
View File

@ -0,0 +1 @@
replicaCount: 1

4
helm/values.yaml Normal file
View File

@ -0,0 +1,4 @@
replicaCount: 3
ingress:
enabled: true