Add charts, dockerfile and zuul jobs of influxdb
Change-Id: I281b5e4f7a59e8fade59a9f63cb4f7449768cfb5
This commit is contained in:
parent
290ca896d0
commit
5c1169c88a
@ -35,18 +35,40 @@ spec:
|
|||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 8080
|
containerPort: 8086
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: INFLUXDB_HTTP_AUTH_ENABLED
|
||||||
|
value: "{{ .Values.config.httpAuthEnabled }}"
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /health
|
||||||
port: http
|
port: 8086
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /health
|
||||||
port: http
|
port: 8086
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 5
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 3
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: influxdb-storage
|
||||||
|
mountPath: /var/lib/influxdb
|
||||||
|
volumes:
|
||||||
|
- name: influxdb-config
|
||||||
|
configMap:
|
||||||
|
name: influxdb-config
|
||||||
|
- name: influxdb-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: influxdb-storage
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
10
charts/nebulous-influxdb/templates/pvc.yaml
Normal file
10
charts/nebulous-influxdb/templates/pvc.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: influxdb-storage
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
@ -1,11 +1,11 @@
|
|||||||
# Default values for nebulous-influxdb.
|
# Default values for nebulous-influxdb.
|
||||||
# This is a YAML-formatted file.
|
|
||||||
# Declare variables to be passed into your templates.
|
|
||||||
|
|
||||||
|
# Number of replicas
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
|
# Image configurations
|
||||||
image:
|
image:
|
||||||
repository: "quay.io/nebulous/influxdb-java-spring-boot-demo"
|
repository: "quay.io/nebulous/influxdb"
|
||||||
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: ""
|
||||||
@ -14,6 +14,12 @@ imagePullSecrets: []
|
|||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
fullnameOverride: ""
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
# InfluxDB specific configurations
|
||||||
|
config:
|
||||||
|
httpAuthEnabled: "true" # Set true or false
|
||||||
|
adminUser: "admin"
|
||||||
|
|
||||||
|
# Service Account configurations
|
||||||
serviceAccount:
|
serviceAccount:
|
||||||
# Specifies whether a service account should be created
|
# Specifies whether a service account should be created
|
||||||
create: true
|
create: true
|
||||||
@ -23,6 +29,7 @@ serviceAccount:
|
|||||||
# If not set and create is true, a name is generated using the fullname template
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
name: ""
|
name: ""
|
||||||
|
|
||||||
|
# Pod configurations
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
@ -36,10 +43,12 @@ securityContext: {}
|
|||||||
# runAsNonRoot: true
|
# runAsNonRoot: true
|
||||||
# runAsUser: 1000
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
# Service settings
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
|
|
||||||
|
# Ingress configurations
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
className: ""
|
className: ""
|
||||||
@ -56,18 +65,17 @@ ingress:
|
|||||||
# hosts:
|
# hosts:
|
||||||
# - chart-example.local
|
# - chart-example.local
|
||||||
|
|
||||||
resources: {}
|
# Resource allocation for pods
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
resources:
|
||||||
# choice for the user. This also increases chances charts run on environments with little
|
# limits and requests for CPU and memory
|
||||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
limits:
|
||||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
cpu: "500m"
|
||||||
# limits:
|
memory: "1Gi"
|
||||||
# cpu: 100m
|
requests:
|
||||||
# memory: 128Mi
|
cpu: "250m"
|
||||||
# requests:
|
memory: "512Mi"
|
||||||
# cpu: 100m
|
|
||||||
# memory: 128Mi
|
|
||||||
|
|
||||||
|
# Autoscaling configurations
|
||||||
autoscaling:
|
autoscaling:
|
||||||
enabled: false
|
enabled: false
|
||||||
minReplicas: 1
|
minReplicas: 1
|
||||||
@ -75,6 +83,7 @@ autoscaling:
|
|||||||
targetCPUUtilizationPercentage: 80
|
targetCPUUtilizationPercentage: 80
|
||||||
# targetMemoryUtilizationPercentage: 80
|
# targetMemoryUtilizationPercentage: 80
|
||||||
|
|
||||||
|
# Node selector, tolerations, and affinity settings
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
|
|
||||||
tolerations: []
|
tolerations: []
|
||||||
|
2
influxdb/Dockerfile
Normal file
2
influxdb/Dockerfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Use the official InfluxDB image with version 2.1.1
|
||||||
|
FROM docker.io/influxdb:2.1.1
|
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-influxdb-container-images
|
- nebulous-influxdb-container-images
|
||||||
description: Build the container images.
|
description: Build the container images.
|
||||||
files: &image_files
|
files: &image_files
|
||||||
- ^java-spring-boot-demo/
|
- ^influxdb/
|
||||||
vars: &image_vars
|
vars: &image_vars
|
||||||
promote_container_image_job: nebulous-influxdb-upload-container-images
|
promote_container_image_job: nebulous-influxdb-upload-container-images
|
||||||
container_images:
|
container_images:
|
||||||
- context: java-spring-boot-demo
|
- context: influxdb
|
||||||
registry: quay.io
|
registry: quay.io
|
||||||
repository: quay.io/nebulous/influxdb-java-spring-boot-demo
|
repository: quay.io/nebulous/influxdb
|
||||||
namespace: nebulous
|
namespace: nebulous
|
||||||
repo_shortname: influxdb-java-spring-boot-demo
|
repo_shortname: influxdb
|
||||||
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
|
- influxdb/Dockerfile
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nebulous-influxdb-helm-lint
|
name: nebulous-influxdb-helm-lint
|
||||||
|
Loading…
Reference in New Issue
Block a user