Update chart configuration of deployment and service
Co-Authored-By: Radosław Piliszek <rpiliszek@7bulls.com> Co-Authored-By: Jan Marchel <jmarchel@7bulls.com> Change-Id: I66d9973313d07edace843c765cc91efbdfb72da0
This commit is contained in:
parent
a0c84c95d7
commit
b3f95fbe38
@ -17,6 +17,6 @@
|
|||||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "nebulous-activemq.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "nebulous-activemq.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
echo "Visit http://127.0.0.1:8161/admin to use your application"
|
||||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8161:$CONTAINER_PORT
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -29,22 +29,25 @@ spec:
|
|||||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
|
env:
|
||||||
|
{{- toYaml .Values.brokerEnv | nindent 12 }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: gui
|
||||||
containerPort: 8080
|
containerPort: 8161
|
||||||
|
protocol: TCP
|
||||||
|
- name: activemq
|
||||||
|
containerPort: 61616
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
tcpSocket:
|
||||||
path: /
|
port: activemq
|
||||||
port: http
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
tcpSocket:
|
||||||
path: /
|
port: activemq
|
||||||
port: http
|
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
|
@ -7,9 +7,13 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
type: {{ .Values.service.type }}
|
type: {{ .Values.service.type }}
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.service.port }}
|
- port: {{ .Values.service.guiPort }}
|
||||||
targetPort: http
|
targetPort: gui
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: gui
|
||||||
|
- port: {{ .Values.service.activemqPort }}
|
||||||
|
targetPort: activemq
|
||||||
|
protocol: TCP
|
||||||
|
name: activemq
|
||||||
selector:
|
selector:
|
||||||
{{- include "nebulous-activemq.selectorLabels" . | nindent 4 }}
|
{{- include "nebulous-activemq.selectorLabels" . | nindent 4 }}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: "quay.io/nebulous/activemq-java-spring-boot-demo"
|
repository: "quay.io/nebulous/activemq-broker"
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: ""
|
tag: ""
|
||||||
@ -38,7 +38,8 @@ securityContext: {}
|
|||||||
|
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
guiPort: 8161
|
||||||
|
activemqPort: 61616
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
@ -80,3 +81,11 @@ nodeSelector: {}
|
|||||||
tolerations: []
|
tolerations: []
|
||||||
|
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
|
||||||
|
brokerEnv:
|
||||||
|
- name: ACTIVEMQ_NAME
|
||||||
|
value: activemq
|
||||||
|
- name: ACTIVEMQ_PASSWORD
|
||||||
|
value: nebulous
|
||||||
|
- name: ACTIVEMQ_USERNAME
|
||||||
|
value: admin
|
||||||
|
2
docker/Dockerfile
Normal file
2
docker/Dockerfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Use the official Apache ActiveMQ image
|
||||||
|
FROM docker.io/apache/activemq-classic:5.18.2
|
33
java-spring-boot-demo/.gitignore
vendored
33
java-spring-boot-demo/.gitignore
vendored
@ -1,33 +0,0 @@
|
|||||||
HELP.md
|
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
!**/src/main/**/target/
|
|
||||||
!**/src/test/**/target/
|
|
||||||
|
|
||||||
### STS ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
.sts4-cache
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
/nbproject/private/
|
|
||||||
/nbbuild/
|
|
||||||
/dist/
|
|
||||||
/nbdist/
|
|
||||||
/.nb-gradle/
|
|
||||||
build/
|
|
||||||
!**/src/main/**/build/
|
|
||||||
!**/src/test/**/build/
|
|
||||||
|
|
||||||
### VS Code ###
|
|
||||||
.vscode/
|
|
@ -1,15 +0,0 @@
|
|||||||
#
|
|
||||||
# Build stage
|
|
||||||
#
|
|
||||||
FROM docker.io/library/maven:3.9.2-eclipse-temurin-17 AS build
|
|
||||||
COPY src /home/app/src
|
|
||||||
COPY pom.xml /home/app
|
|
||||||
RUN mvn -f /home/app/pom.xml clean package
|
|
||||||
|
|
||||||
#
|
|
||||||
# Package stage
|
|
||||||
#
|
|
||||||
FROM docker.io/library/eclipse-temurin:17-jre
|
|
||||||
COPY --from=build /home/app/target/demo-0.0.1-SNAPSHOT.jar /usr/local/lib/demo.jar
|
|
||||||
EXPOSE 8080
|
|
||||||
ENTRYPOINT ["java","-jar","/usr/local/lib/demo.jar"]
|
|
@ -1,42 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
|
||||||
<version>3.1.0</version>
|
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
|
||||||
</parent>
|
|
||||||
<groupId>com.example</groupId>
|
|
||||||
<artifactId>demo</artifactId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
<name>demo</name>
|
|
||||||
<description>Demo project for Spring Boot</description>
|
|
||||||
<properties>
|
|
||||||
<java.version>17</java.version>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
@ -1,13 +0,0 @@
|
|||||||
package com.example.demo;
|
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
|
||||||
public class DemoApplication {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(DemoApplication.class, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
package com.example.demo;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
public class DemoController {
|
|
||||||
|
|
||||||
@RequestMapping("/")
|
|
||||||
public Object root() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
package com.example.demo;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
@SpringBootTest
|
|
||||||
class DemoApplicationTests {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void contextLoads() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -8,15 +8,15 @@
|
|||||||
- nebulous-activemq-container-images
|
- nebulous-activemq-container-images
|
||||||
description: Build the container images.
|
description: Build the container images.
|
||||||
files: &image_files
|
files: &image_files
|
||||||
- ^java-spring-boot-demo/
|
- ^docker/
|
||||||
vars: &image_vars
|
vars: &image_vars
|
||||||
promote_container_image_job: nebulous-activemq-upload-container-images
|
promote_container_image_job: nebulous-activemq-upload-container-images
|
||||||
container_images:
|
container_images:
|
||||||
- context: java-spring-boot-demo
|
- context: docker
|
||||||
registry: quay.io
|
registry: quay.io
|
||||||
repository: quay.io/nebulous/activemq-java-spring-boot-demo
|
repository: quay.io/nebulous/activemq-broker
|
||||||
namespace: nebulous
|
namespace: nebulous
|
||||||
repo_shortname: activemq-java-spring-boot-demo
|
repo_shortname: activemq-broker
|
||||||
repo_description: ""
|
repo_description: ""
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
@ -44,7 +44,7 @@
|
|||||||
description: Run Hadolint on Dockerfile(s).
|
description: Run Hadolint on Dockerfile(s).
|
||||||
vars:
|
vars:
|
||||||
dockerfiles:
|
dockerfiles:
|
||||||
- java-spring-boot-demo/Dockerfile
|
- docker/Dockerfile
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nebulous-activemq-helm-lint
|
name: nebulous-activemq-helm-lint
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
- nebulous-activemq-helm-lint
|
- nebulous-activemq-helm-lint
|
||||||
- nebulous-activemq-build-container-images
|
- nebulous-activemq-build-container-images
|
||||||
- nebulous-activemq-hadolint
|
- nebulous-activemq-hadolint
|
||||||
|
# TODO: temporary, remove
|
||||||
|
- nebulous-activemq-apply-helm-charts
|
||||||
- nebulous-platform-apply-helm-charts
|
- nebulous-platform-apply-helm-charts
|
||||||
- nox-linters
|
- nox-linters
|
||||||
gate:
|
gate:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user