From e2384ada9e9689b7ce776c7f02058ebe308fb09a Mon Sep 17 00:00:00 2001 From: Gaurav Karemore <95206483+gauravrajlaxmi@users.noreply.github.com> Date: Thu, 23 Jan 2025 23:40:21 +0530 Subject: [PATCH 01/13] Update worker.service.ts --- angular-frontend/src/app/services/worker.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-frontend/src/app/services/worker.service.ts b/angular-frontend/src/app/services/worker.service.ts index d64cc20..667cc65 100644 --- a/angular-frontend/src/app/services/worker.service.ts +++ b/angular-frontend/src/app/services/worker.service.ts @@ -9,7 +9,7 @@ import { Worker } from '../models/worker'; }) export class WorkerService { - private getUrl: string = "http://localhost:8080/api/v1/workers"; + private getUrl: string = "http://54.83.90.121:8080/api/v1/workers"; constructor(private _httpClient: HttpClient) { } From 598cc93e83b765b26761e9778517de62e641376b Mon Sep 17 00:00:00 2001 From: Gaurav Karemore <95206483+gauravrajlaxmi@users.noreply.github.com> Date: Thu, 23 Jan 2025 23:41:41 +0530 Subject: [PATCH 02/13] Update application.properties --- spring-backend/src/main/resources/application.properties | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-backend/src/main/resources/application.properties b/spring-backend/src/main/resources/application.properties index 10c4f6d..d44714f 100644 --- a/spring-backend/src/main/resources/application.properties +++ b/spring-backend/src/main/resources/application.properties @@ -1,5 +1,5 @@ -spring.datasource.url=jdbc:mysql://localhost:3306/springbackend?useSSL=false -spring.datasource.username=springbackend -spring.datasource.password=springbackend +spring.datasource.url=jdbc:mysql://springbackend1.c9ssayqq8va2.us-east-1.rds.amazonaws.com:3306/springbackend?useSSL=false +spring.datasource.username=admin +spring.datasource.password=admin123 -spring.jpa.generate-ddl=true \ No newline at end of file +spring.jpa.generate-ddl=true From bcb07b04750dbdd9c7ec6e511213985668c8c67c Mon Sep 17 00:00:00 2001 From: root Date: Thu, 23 Jan 2025 18:26:27 +0000 Subject: [PATCH 03/13] fsf --- angular-frontend/Dockerfile | 29 +++++++++++++++++++++++++++++ spring-backend/Dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 angular-frontend/Dockerfile create mode 100644 spring-backend/Dockerfile diff --git a/angular-frontend/Dockerfile b/angular-frontend/Dockerfile new file mode 100644 index 0000000..8d9b993 --- /dev/null +++ b/angular-frontend/Dockerfile @@ -0,0 +1,29 @@ +# Use official Node.js image as the base image +FROM node:14-alpine AS build + +# Set the working directory in the container +WORKDIR /usr/src/app + +# Copy package.json and package-lock.json (if available) +COPY package*.json ./ + +# Install project dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Build the Angular application +RUN npm run build + +# Use NGINX as the production server +FROM nginx:alpine + +# Copy the built artifact from the previous stage to NGINX web server directory +COPY --from=build /usr/src/app/dist/angular-frontend /usr/share/nginx/html + +# Expose port 80 to the outside world +EXPOSE 80 + +# Start NGINX server when the container starts +CMD ["nginx", "-g", "daemon off;"] diff --git a/spring-backend/Dockerfile b/spring-backend/Dockerfile new file mode 100644 index 0000000..06c23e5 --- /dev/null +++ b/spring-backend/Dockerfile @@ -0,0 +1,22 @@ +# Use Ubuntu as base image +FROM ubuntu:latest + +# Install dependencies +RUN apt-get update && \ + apt-get install -y openjdk-8-jdk maven && \ + rm -rf /var/lib/apt/lists/* + +# Set the working directory in the container +WORKDIR /app + +# Copy the Maven project directory into the container +COPY . /app + +# Build the Maven project +RUN mvn clean package -Dmaven.test.skip=true + +# Expose the port the application runs on +EXPOSE 8080 + +# Command to run the application +CMD ["java", "-jar", "target/spring-backend-v1.jar"] From eb28159853608f4c13e39acafcb3caf5330bc8a1 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 23 Jan 2025 18:31:56 +0000 Subject: [PATCH 04/13] index --- angular-frontend/src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-frontend/src/index.html b/angular-frontend/src/index.html index cde9439..166f7ba 100644 --- a/angular-frontend/src/index.html +++ b/angular-frontend/src/index.html @@ -2,7 +2,7 @@ - AngularFrontend + myAngularFrontend From 4bee03180a5c07168a35cba9fd025b86801284b5 Mon Sep 17 00:00:00 2001 From: Gaurav Karemore <95206483+gauravrajlaxmi@users.noreply.github.com> Date: Tue, 23 Dec 2025 09:34:55 +0530 Subject: [PATCH 05/13] Refactor datasource configuration to use env variables Updated database connection properties to use environment variables. --- .../src/main/resources/application.properties | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/spring-backend/src/main/resources/application.properties b/spring-backend/src/main/resources/application.properties index d44714f..91a4559 100644 --- a/spring-backend/src/main/resources/application.properties +++ b/spring-backend/src/main/resources/application.properties @@ -1,5 +1,12 @@ -spring.datasource.url=jdbc:mysql://springbackend1.c9ssayqq8va2.us-east-1.rds.amazonaws.com:3306/springbackend?useSSL=false -spring.datasource.username=admin -spring.datasource.password=admin123 +# spring.datasource.url=jdbc:mysql://springbackend1.c9ssayqq8va2.us-east-1.rds.amazonaws.com:3306/springbackend?useSSL=false +#spring.datasource.username=admin +#spring.datasource.password=admin123 + +#spring.jpa.generate-ddl=true +spring.datasource.url=${SPRING_DATASOURCE_URL} +spring.datasource.username=${SPRING_DATASOURCE_USERNAME} +spring.datasource.password=${SPRING_DATASOURCE_PASSWORD} spring.jpa.generate-ddl=true +spring.jpa.hibernate.ddl-auto=update + From 9eba1b9ad0167fd41b090c4cdb905c94b1c26c39 Mon Sep 17 00:00:00 2001 From: Gaurav Karemore <95206483+gauravrajlaxmi@users.noreply.github.com> Date: Tue, 23 Dec 2025 09:39:38 +0530 Subject: [PATCH 06/13] Change getUrl to relative API endpoint Updated the getUrl to use a relative path instead of an absolute URL. --- angular-frontend/src/app/services/worker.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/angular-frontend/src/app/services/worker.service.ts b/angular-frontend/src/app/services/worker.service.ts index 667cc65..de5346d 100644 --- a/angular-frontend/src/app/services/worker.service.ts +++ b/angular-frontend/src/app/services/worker.service.ts @@ -9,7 +9,9 @@ import { Worker } from '../models/worker'; }) export class WorkerService { - private getUrl: string = "http://54.83.90.121:8080/api/v1/workers"; + // private getUrl: string = "http://54.83.90.121:8080/api/v1/workers"; + private getUrl = "/api/v1/workers"; + constructor(private _httpClient: HttpClient) { } From 40c79acce27dc1b7f9709bddb842046047cf14c5 Mon Sep 17 00:00:00 2001 From: Gaurav Karemore <95206483+gauravrajlaxmi@users.noreply.github.com> Date: Tue, 23 Dec 2025 19:54:55 +0530 Subject: [PATCH 07/13] Refactor Dockerfile for multi-stage build --- angular-frontend/Dockerfile | 58 ++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/angular-frontend/Dockerfile b/angular-frontend/Dockerfile index 8d9b993..d00a0a2 100644 --- a/angular-frontend/Dockerfile +++ b/angular-frontend/Dockerfile @@ -1,29 +1,53 @@ -# Use official Node.js image as the base image +# Build stage FROM node:14-alpine AS build - -# Set the working directory in the container WORKDIR /usr/src/app - -# Copy package.json and package-lock.json (if available) COPY package*.json ./ - -# Install project dependencies RUN npm install - -# Copy the rest of the application code COPY . . +RUN npm run build -# Build the Angular application -RUN npm run build - -# Use NGINX as the production server +# Runtime stage FROM nginx:alpine -# Copy the built artifact from the previous stage to NGINX web server directory +# Remove default NGINX config +RUN rm /etc/nginx/conf.d/default.conf + +# Copy your custom config +COPY nginx.conf /etc/nginx/conf.d/default.conf + +# Copy Angular build output COPY --from=build /usr/src/app/dist/angular-frontend /usr/share/nginx/html -# Expose port 80 to the outside world EXPOSE 80 - -# Start NGINX server when the container starts CMD ["nginx", "-g", "daemon off;"] + + +# # Use official Node.js image as the base image +# FROM node:14-alpine AS build + +# # Set the working directory in the container +# WORKDIR /usr/src/app + +# # Copy package.json and package-lock.json (if available) +# COPY package*.json ./ + +# # Install project dependencies +# RUN npm install + +# # Copy the rest of the application code +# COPY . . + +# # Build the Angular application +# RUN npm run build + +# # Use NGINX as the production server +# FROM nginx:alpine + +# # Copy the built artifact from the previous stage to NGINX web server directory +# COPY --from=build /usr/src/app/dist/angular-frontend /usr/share/nginx/html + +# # Expose port 80 to the outside world +# EXPOSE 80 + +# # Start NGINX server when the container starts +# CMD ["nginx", "-g", "daemon off;"] From 30d5e10c8f0b725fde96fe20a8013c85008badf4 Mon Sep 17 00:00:00 2001 From: Gaurav Karemore <95206483+gauravrajlaxmi@users.noreply.github.com> Date: Tue, 23 Dec 2025 19:55:56 +0530 Subject: [PATCH 08/13] Refactor Dockerfile for multi-stage build --- spring-backend/Dockerfile | 47 ++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/spring-backend/Dockerfile b/spring-backend/Dockerfile index 06c23e5..49f209c 100644 --- a/spring-backend/Dockerfile +++ b/spring-backend/Dockerfile @@ -1,22 +1,37 @@ -# Use Ubuntu as base image -FROM ubuntu:latest - -# Install dependencies -RUN apt-get update && \ - apt-get install -y openjdk-8-jdk maven && \ - rm -rf /var/lib/apt/lists/* +# Build stage +FROM maven:3.9.6-eclipse-temurin-8 AS build +WORKDIR /app +COPY pom.xml . +COPY src ./src +RUN mvn clean package -DskipTests -# Set the working directory in the container +# Runtime stage +FROM eclipse-temurin:8-jre WORKDIR /app +COPY --from=build /app/target/spring-backend-v1.jar app.jar +EXPOSE 8080 +ENTRYPOINT ["java", "-jar", "app.jar"] -# Copy the Maven project directory into the container -COPY . /app -# Build the Maven project -RUN mvn clean package -Dmaven.test.skip=true +# # Use Ubuntu as base image +# FROM ubuntu:latest -# Expose the port the application runs on -EXPOSE 8080 +# # Install dependencies +# RUN apt-get update && \ +# apt-get install -y openjdk-8-jdk maven && \ +# rm -rf /var/lib/apt/lists/* + +# # Set the working directory in the container +# WORKDIR /app + +# # Copy the Maven project directory into the container +# COPY . /app + +# # Build the Maven project +# RUN mvn clean package -Dmaven.test.skip=true + +# # Expose the port the application runs on +# EXPOSE 8080 -# Command to run the application -CMD ["java", "-jar", "target/spring-backend-v1.jar"] +# # Command to run the application +# CMD ["java", "-jar", "target/spring-backend-v1.jar"] From 2bcab100b3ea8d596b132c4da4e60eb0203e01c8 Mon Sep 17 00:00:00 2001 From: Gaurav Karemore <95206483+gauravrajlaxmi@users.noreply.github.com> Date: Tue, 23 Dec 2025 19:58:07 +0530 Subject: [PATCH 09/13] Add docker-compose configuration for backend and frontend --- docker-compose.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..552870c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +version: "3.9" + +services: + backend: + image: ${BACKEND_IMAGE} + container_name: spring_backend + ports: + - "8080:8080" + environment: + SPRING_DATASOURCE_URL: jdbc:mysql://${DB_HOST}:${DB_PORT}/${DB_NAME}?${DB_PARAMS} + SPRING_DATASOURCE_USERNAME: ${DB_USER} + SPRING_DATASOURCE_PASSWORD: ${DB_PASSWORD} + restart: always + + frontend: + image: ${FRONTEND_IMAGE} + container_name: angular_frontend + ports: + - "80:80" + depends_on: + - backend + restart: always From ebe95a400fd4ada1e9878d81b81297474d1de8bb Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 10 Jun 2026 14:38:35 +0000 Subject: [PATCH 10/13] add helm-argocd-promethius-grafnaa --- angular-frontend/nginx.conf | 17 ++ backend-argocd.yml | 26 +++ helm/backend/.helmignore | 23 +++ helm/backend/Chart.yaml | 31 +++ helm/backend/templates/configmap.yml | 8 + helm/backend/templates/deployment.yml | 60 ++++++ helm/backend/templates/secret.yml | 9 + helm/backend/templates/service.yml | 15 ++ helm/backend/values.yaml | 190 ++++++++++++++++++ helm/frontend/.helmignore | 23 +++ helm/frontend/Chart.yaml | 30 +++ helm/frontend/templates/deployment.yml | 29 +++ helm/frontend/templates/service.yml | 14 ++ helm/frontend/values.yaml | 181 +++++++++++++++++ helm/ingress/.helmignore | 23 +++ helm/ingress/Chart.yaml | 31 +++ helm/ingress/templates/ingress.yml | 32 +++ helm/ingress/values.yaml | 163 +++++++++++++++ kind-config.yml | 17 ++ spring-backend/pom.xml | 14 +- .../src/main/resources/application.properties | 20 +- 21 files changed, 948 insertions(+), 8 deletions(-) create mode 100644 angular-frontend/nginx.conf create mode 100644 backend-argocd.yml create mode 100644 helm/backend/.helmignore create mode 100644 helm/backend/Chart.yaml create mode 100644 helm/backend/templates/configmap.yml create mode 100644 helm/backend/templates/deployment.yml create mode 100644 helm/backend/templates/secret.yml create mode 100644 helm/backend/templates/service.yml create mode 100644 helm/backend/values.yaml create mode 100644 helm/frontend/.helmignore create mode 100644 helm/frontend/Chart.yaml create mode 100644 helm/frontend/templates/deployment.yml create mode 100644 helm/frontend/templates/service.yml create mode 100644 helm/frontend/values.yaml create mode 100644 helm/ingress/.helmignore create mode 100644 helm/ingress/Chart.yaml create mode 100644 helm/ingress/templates/ingress.yml create mode 100644 helm/ingress/values.yaml create mode 100644 kind-config.yml diff --git a/angular-frontend/nginx.conf b/angular-frontend/nginx.conf new file mode 100644 index 0000000..bd681a6 --- /dev/null +++ b/angular-frontend/nginx.conf @@ -0,0 +1,17 @@ +server { + listen 80; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } + + location /api/ { + proxy_pass http://backend:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } +} \ No newline at end of file diff --git a/backend-argocd.yml b/backend-argocd.yml new file mode 100644 index 0000000..c5386d7 --- /dev/null +++ b/backend-argocd.yml @@ -0,0 +1,26 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: backend + namespace: argocd +spec: + project: default + + source: + repoURL: https://github.com/gauravrajlaxmi/angular-java.git + targetRevision: main + path: /angular-java/helm/backend/ + helm: + valueFiles: + - values.yml + + destination: + server: https://kubernetes.default.svc + namespace: apps + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/helm/backend/.helmignore b/helm/backend/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/helm/backend/.helmignore @@ -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/ diff --git a/helm/backend/Chart.yaml b/helm/backend/Chart.yaml new file mode 100644 index 0000000..60aa98f --- /dev/null +++ b/helm/backend/Chart.yaml @@ -0,0 +1,31 @@ +apiVersion: v2 +name: backend +description: Spring Boot Backend +type: application +version: 0.1.0 +appVersion: "1.0" + +# 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: 0.1.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. 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" diff --git a/helm/backend/templates/configmap.yml b/helm/backend/templates/configmap.yml new file mode 100644 index 0000000..1acc89b --- /dev/null +++ b/helm/backend/templates/configmap.yml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: backend-config +data: + DB_HOST: {{ .Values.database.host | quote }} + DB_PORT: {{ .Values.database.port | quote }} + DB_NAME: {{ .Values.database.name | quote }} \ No newline at end of file diff --git a/helm/backend/templates/deployment.yml b/helm/backend/templates/deployment.yml new file mode 100644 index 0000000..4911170 --- /dev/null +++ b/helm/backend/templates/deployment.yml @@ -0,0 +1,60 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: backend +spec: + replicas: {{ .Values.replicaCount }} + + selector: + matchLabels: + app: backend + + template: + metadata: + labels: + app: backend + + spec: + containers: + - name: backend + + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + + ports: + - containerPort: 8080 + + env: + + - name: DB_HOST + valueFrom: + configMapKeyRef: + name: backend-config + key: DB_HOST + + - name: DB_PORT + valueFrom: + configMapKeyRef: + name: backend-config + key: DB_PORT + + - name: DB_NAME + valueFrom: + configMapKeyRef: + name: backend-config + key: DB_NAME + + - name: DB_USERNAME + valueFrom: + secretKeyRef: + name: backend-secret + key: DB_USERNAME + + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: backend-secret + key: DB_PASSWORD + + resources: +{{ toYaml .Values.resources | indent 10 }} \ No newline at end of file diff --git a/helm/backend/templates/secret.yml b/helm/backend/templates/secret.yml new file mode 100644 index 0000000..eb1c2b5 --- /dev/null +++ b/helm/backend/templates/secret.yml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: backend-secret +type: Opaque + +stringData: + DB_USERNAME: {{ .Values.secret.username | quote }} + DB_PASSWORD: {{ .Values.secret.password | quote }} \ No newline at end of file diff --git a/helm/backend/templates/service.yml b/helm/backend/templates/service.yml new file mode 100644 index 0000000..9860dd9 --- /dev/null +++ b/helm/backend/templates/service.yml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: backend + +spec: + selector: + app: backend + + ports: + - name: http + port: 8080 + targetPort: 8080 + + type: {{ .Values.service.type }} \ No newline at end of file diff --git a/helm/backend/values.yaml b/helm/backend/values.yaml new file mode 100644 index 0000000..f382bc0 --- /dev/null +++ b/helm/backend/values.yaml @@ -0,0 +1,190 @@ +replicaCount: 1 + +image: + repository: gauravrajlaxmi15/angular-backend + tag: "1.2" + pullPolicy: Always + +service: + type: ClusterIP + port: 8080 + +database: + host: springbackend.c4fuciai0wpt.us-east-1.rds.amazonaws.com + port: "3306" + name: springbackend + +secret: + username: admin + password: admin123 + +resources: + requests: + cpu: 250m + memory: 512Mi + limits: + cpu: 500m + memory: 1Gi + + +# # Default values for backend. +# # This is a YAML-formatted file. +# # Declare variables to be passed into your templates. + +# # This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +# replicaCount: 1 + +# # This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +# image: +# repository: nginx +# # This sets the pull policy for images. +# pullPolicy: IfNotPresent +# # Overrides the image tag whose default is the chart appVersion. +# tag: "" + +# # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +# imagePullSecrets: [] +# # This is to override the chart name. +# nameOverride: "" +# fullnameOverride: "" + +# # This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +# serviceAccount: +# # Specifies whether a service account should be created +# create: true +# # Automatically mount a ServiceAccount's API credentials? +# automount: true +# # Annotations to add to the service account +# annotations: {} +# # The name of the service account to use. +# # If not set and create is true, a name is generated using the fullname template +# name: "" + +# # This is for setting Kubernetes Annotations to a Pod. +# # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +# podAnnotations: {} +# # This is for setting Kubernetes Labels to a Pod. +# # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +# podLabels: {} + +# podSecurityContext: {} +# # fsGroup: 2000 + +# securityContext: {} +# # capabilities: +# # drop: +# # - ALL +# # readOnlyRootFilesystem: true +# # runAsNonRoot: true +# # runAsUser: 1000 + +# # This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +# service: +# # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types +# type: ClusterIP +# # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports +# port: 80 + +# # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ +# ingress: +# enabled: false +# className: "" +# annotations: {} +# # kubernetes.io/ingress.class: nginx +# # kubernetes.io/tls-acme: "true" +# hosts: +# - host: chart-example.local +# paths: +# - path: / +# pathType: ImplementationSpecific +# tls: [] +# # - secretName: chart-example-tls +# # hosts: +# # - chart-example.local + +# # -- Expose the service via gateway-api HTTPRoute +# # Requires Gateway API resources and suitable controller installed within the cluster +# # (see: https://gateway-api.sigs.k8s.io/guides/) +# httpRoute: +# # HTTPRoute enabled. +# enabled: false +# # HTTPRoute annotations. +# annotations: {} +# # Which Gateways this Route is attached to. +# parentRefs: +# - name: gateway +# sectionName: http +# # namespace: default +# # Hostnames matching HTTP header. +# hostnames: +# - chart-example.local +# # List of rules and filters applied. +# rules: +# - matches: +# - path: +# type: PathPrefix +# value: /headers +# # filters: +# # - type: RequestHeaderModifier +# # requestHeaderModifier: +# # set: +# # - name: My-Overwrite-Header +# # value: this-is-the-only-value +# # remove: +# # - User-Agent +# # - matches: +# # - path: +# # type: PathPrefix +# # value: /echo +# # headers: +# # - name: version +# # value: v2 + +# resources: {} +# # We usually recommend not to specify default resources and to leave this as a conscious +# # choice for the user. This also increases chances charts run on environments with little +# # resources, such as Minikube. If you do want to specify resources, uncomment the following +# # lines, adjust them as necessary, and remove the curly braces after 'resources:'. +# # limits: +# # cpu: 100m +# # memory: 128Mi +# # requests: +# # cpu: 100m +# # memory: 128Mi + +# # This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +# livenessProbe: +# httpGet: +# path: / +# port: http +# readinessProbe: +# httpGet: +# path: / +# port: http + +# # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ +# autoscaling: +# enabled: false +# minReplicas: 1 +# maxReplicas: 100 +# targetCPUUtilizationPercentage: 80 +# # targetMemoryUtilizationPercentage: 80 + +# # Additional volumes on the output Deployment definition. +# volumes: [] +# # - name: foo +# # secret: +# # secretName: mysecret +# # optional: false + +# # Additional volumeMounts on the output Deployment definition. +# volumeMounts: [] +# # - name: foo +# # mountPath: "/etc/foo" +# # readOnly: true + +# nodeSelector: {} + +# tolerations: [] + +# affinity: {} diff --git a/helm/frontend/.helmignore b/helm/frontend/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/helm/frontend/.helmignore @@ -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/ diff --git a/helm/frontend/Chart.yaml b/helm/frontend/Chart.yaml new file mode 100644 index 0000000..67cc864 --- /dev/null +++ b/helm/frontend/Chart.yaml @@ -0,0 +1,30 @@ +apiVersion: v2 +name: frontend +description: Angular Frontend +type: application +version: 0.1.0 +appVersion: "1.0" +# 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: 0.1.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. 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" diff --git a/helm/frontend/templates/deployment.yml b/helm/frontend/templates/deployment.yml new file mode 100644 index 0000000..d9fd82b --- /dev/null +++ b/helm/frontend/templates/deployment.yml @@ -0,0 +1,29 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: frontend + +spec: + replicas: {{ .Values.replicaCount }} + + selector: + matchLabels: + app: frontend + + template: + metadata: + labels: + app: frontend + + spec: + containers: + - name: frontend + + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + + ports: + - containerPort: 80 + + resources: +{{ toYaml .Values.resources | indent 10 }} \ No newline at end of file diff --git a/helm/frontend/templates/service.yml b/helm/frontend/templates/service.yml new file mode 100644 index 0000000..8480aaa --- /dev/null +++ b/helm/frontend/templates/service.yml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: frontend + +spec: + selector: + app: frontend + + ports: + - port: 80 + targetPort: 80 + + type: {{ .Values.service.type }} \ No newline at end of file diff --git a/helm/frontend/values.yaml b/helm/frontend/values.yaml new file mode 100644 index 0000000..750acdc --- /dev/null +++ b/helm/frontend/values.yaml @@ -0,0 +1,181 @@ +replicaCount: 1 + +image: + repository: gauravrajlaxmi15/angular-frontend + tag: "1.1" + pullPolicy: Always + +service: + type: ClusterIP + port: 80 + +resources: + requests: + cpu: 100m + memory: 128Mi + + limits: + cpu: 200m + memory: 256Mi + +# # Default values for frontend. +# # This is a YAML-formatted file. +# # Declare variables to be passed into your templates. + +# # This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +# replicaCount: 1 + +# # This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +# image: +# repository: nginx +# # This sets the pull policy for images. +# pullPolicy: IfNotPresent +# # Overrides the image tag whose default is the chart appVersion. +# tag: "" + +# # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +# imagePullSecrets: [] +# # This is to override the chart name. +# nameOverride: "" +# fullnameOverride: "" + +# # This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +# serviceAccount: +# # Specifies whether a service account should be created +# create: true +# # Automatically mount a ServiceAccount's API credentials? +# automount: true +# # Annotations to add to the service account +# annotations: {} +# # The name of the service account to use. +# # If not set and create is true, a name is generated using the fullname template +# name: "" + +# # This is for setting Kubernetes Annotations to a Pod. +# # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +# podAnnotations: {} +# # This is for setting Kubernetes Labels to a Pod. +# # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +# podLabels: {} + +# podSecurityContext: {} +# # fsGroup: 2000 + +# securityContext: {} +# # capabilities: +# # drop: +# # - ALL +# # readOnlyRootFilesystem: true +# # runAsNonRoot: true +# # runAsUser: 1000 + +# # This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +# service: +# # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types +# type: ClusterIP +# # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports +# port: 80 + +# # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ +# ingress: +# enabled: false +# className: "" +# annotations: {} +# # kubernetes.io/ingress.class: nginx +# # kubernetes.io/tls-acme: "true" +# hosts: +# - host: chart-example.local +# paths: +# - path: / +# pathType: ImplementationSpecific +# tls: [] +# # - secretName: chart-example-tls +# # hosts: +# # - chart-example.local + +# # -- Expose the service via gateway-api HTTPRoute +# # Requires Gateway API resources and suitable controller installed within the cluster +# # (see: https://gateway-api.sigs.k8s.io/guides/) +# httpRoute: +# # HTTPRoute enabled. +# enabled: false +# # HTTPRoute annotations. +# annotations: {} +# # Which Gateways this Route is attached to. +# parentRefs: +# - name: gateway +# sectionName: http +# # namespace: default +# # Hostnames matching HTTP header. +# hostnames: +# - chart-example.local +# # List of rules and filters applied. +# rules: +# - matches: +# - path: +# type: PathPrefix +# value: /headers +# # filters: +# # - type: RequestHeaderModifier +# # requestHeaderModifier: +# # set: +# # - name: My-Overwrite-Header +# # value: this-is-the-only-value +# # remove: +# # - User-Agent +# # - matches: +# # - path: +# # type: PathPrefix +# # value: /echo +# # headers: +# # - name: version +# # value: v2 + +# resources: {} +# # We usually recommend not to specify default resources and to leave this as a conscious +# # choice for the user. This also increases chances charts run on environments with little +# # resources, such as Minikube. If you do want to specify resources, uncomment the following +# # lines, adjust them as necessary, and remove the curly braces after 'resources:'. +# # limits: +# # cpu: 100m +# # memory: 128Mi +# # requests: +# # cpu: 100m +# # memory: 128Mi + +# # This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +# livenessProbe: +# httpGet: +# path: / +# port: http +# readinessProbe: +# httpGet: +# path: / +# port: http + +# # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ +# autoscaling: +# enabled: false +# minReplicas: 1 +# maxReplicas: 100 +# targetCPUUtilizationPercentage: 80 +# # targetMemoryUtilizationPercentage: 80 + +# # Additional volumes on the output Deployment definition. +# volumes: [] +# # - name: foo +# # secret: +# # secretName: mysecret +# # optional: false + +# # Additional volumeMounts on the output Deployment definition. +# volumeMounts: [] +# # - name: foo +# # mountPath: "/etc/foo" +# # readOnly: true + +# nodeSelector: {} + +# tolerations: [] + +# affinity: {} diff --git a/helm/ingress/.helmignore b/helm/ingress/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/helm/ingress/.helmignore @@ -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/ diff --git a/helm/ingress/Chart.yaml b/helm/ingress/Chart.yaml new file mode 100644 index 0000000..f4db49e --- /dev/null +++ b/helm/ingress/Chart.yaml @@ -0,0 +1,31 @@ +apiVersion: v2 +name: ingress +description: Application Ingress +type: application +version: 0.1.0 +appVersion: "1.0" + +# apiVersion: v2 +# name: ingress +# 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: 0.1.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. 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" diff --git a/helm/ingress/templates/ingress.yml b/helm/ingress/templates/ingress.yml new file mode 100644 index 0000000..875c876 --- /dev/null +++ b/helm/ingress/templates/ingress.yml @@ -0,0 +1,32 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress + +metadata: + name: employee-ingress + +spec: + ingressClassName: nginx + + rules: + - host: {{ .Values.host }} + + http: + paths: + + - path: / + pathType: Prefix + + backend: + service: + name: frontend + port: + number: 80 + + - path: /api + pathType: Prefix + + backend: + service: + name: backend + port: + number: 8080 \ No newline at end of file diff --git a/helm/ingress/values.yaml b/helm/ingress/values.yaml new file mode 100644 index 0000000..2175ad1 --- /dev/null +++ b/helm/ingress/values.yaml @@ -0,0 +1,163 @@ +host: employee.local + +# # Default values for ingress. +# # This is a YAML-formatted file. +# # Declare variables to be passed into your templates. + +# # This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +# replicaCount: 1 + +# # This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ +# image: +# repository: nginx +# # This sets the pull policy for images. +# pullPolicy: IfNotPresent +# # Overrides the image tag whose default is the chart appVersion. +# tag: "" + +# # This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ +# imagePullSecrets: [] +# # This is to override the chart name. +# nameOverride: "" +# fullnameOverride: "" + +# # This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +# serviceAccount: +# # Specifies whether a service account should be created +# create: true +# # Automatically mount a ServiceAccount's API credentials? +# automount: true +# # Annotations to add to the service account +# annotations: {} +# # The name of the service account to use. +# # If not set and create is true, a name is generated using the fullname template +# name: "" + +# # This is for setting Kubernetes Annotations to a Pod. +# # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ +# podAnnotations: {} +# # This is for setting Kubernetes Labels to a Pod. +# # For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +# podLabels: {} + +# podSecurityContext: {} +# # fsGroup: 2000 + +# securityContext: {} +# # capabilities: +# # drop: +# # - ALL +# # readOnlyRootFilesystem: true +# # runAsNonRoot: true +# # runAsUser: 1000 + +# # This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ +# service: +# # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types +# type: ClusterIP +# # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports +# port: 80 + +# # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ +# ingress: +# enabled: false +# className: "" +# annotations: {} +# # kubernetes.io/ingress.class: nginx +# # kubernetes.io/tls-acme: "true" +# hosts: +# - host: chart-example.local +# paths: +# - path: / +# pathType: ImplementationSpecific +# tls: [] +# # - secretName: chart-example-tls +# # hosts: +# # - chart-example.local + +# # -- Expose the service via gateway-api HTTPRoute +# # Requires Gateway API resources and suitable controller installed within the cluster +# # (see: https://gateway-api.sigs.k8s.io/guides/) +# httpRoute: +# # HTTPRoute enabled. +# enabled: false +# # HTTPRoute annotations. +# annotations: {} +# # Which Gateways this Route is attached to. +# parentRefs: +# - name: gateway +# sectionName: http +# # namespace: default +# # Hostnames matching HTTP header. +# hostnames: +# - chart-example.local +# # List of rules and filters applied. +# rules: +# - matches: +# - path: +# type: PathPrefix +# value: /headers +# # filters: +# # - type: RequestHeaderModifier +# # requestHeaderModifier: +# # set: +# # - name: My-Overwrite-Header +# # value: this-is-the-only-value +# # remove: +# # - User-Agent +# # - matches: +# # - path: +# # type: PathPrefix +# # value: /echo +# # headers: +# # - name: version +# # value: v2 + +# resources: {} +# # We usually recommend not to specify default resources and to leave this as a conscious +# # choice for the user. This also increases chances charts run on environments with little +# # resources, such as Minikube. If you do want to specify resources, uncomment the following +# # lines, adjust them as necessary, and remove the curly braces after 'resources:'. +# # limits: +# # cpu: 100m +# # memory: 128Mi +# # requests: +# # cpu: 100m +# # memory: 128Mi + +# # This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +# livenessProbe: +# httpGet: +# path: / +# port: http +# readinessProbe: +# httpGet: +# path: / +# port: http + +# # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ +# autoscaling: +# enabled: false +# minReplicas: 1 +# maxReplicas: 100 +# targetCPUUtilizationPercentage: 80 +# # targetMemoryUtilizationPercentage: 80 + +# # Additional volumes on the output Deployment definition. +# volumes: [] +# # - name: foo +# # secret: +# # secretName: mysecret +# # optional: false + +# # Additional volumeMounts on the output Deployment definition. +# volumeMounts: [] +# # - name: foo +# # mountPath: "/etc/foo" +# # readOnly: true + +# nodeSelector: {} + +# tolerations: [] + +# affinity: {} diff --git a/kind-config.yml b/kind-config.yml new file mode 100644 index 0000000..609f42f --- /dev/null +++ b/kind-config.yml @@ -0,0 +1,17 @@ +kind: Cluster + +apiVersion: kind.x-k8s.io/v1alpha4 + +nodes: + +- role: control-plane + + extraPortMappings: + + - containerPort: 80 + hostPort: 80 + protocol: TCP + + - containerPort: 443 + hostPort: 443 + protocol: TCP diff --git a/spring-backend/pom.xml b/spring-backend/pom.xml index 03ae237..9c3ad3f 100644 --- a/spring-backend/pom.xml +++ b/spring-backend/pom.xml @@ -1,12 +1,13 @@ - 4.0.0 org.springframework.boot spring-boot-starter-parent 2.7.4 - + com.example spring-backend @@ -33,10 +34,15 @@ runtime true - + + + org.mariadb.jdbc + mariadb-java-client + 3.4.1 org.projectlombok @@ -67,4 +73,4 @@ - + \ No newline at end of file diff --git a/spring-backend/src/main/resources/application.properties b/spring-backend/src/main/resources/application.properties index 91a4559..53a58cb 100644 --- a/spring-backend/src/main/resources/application.properties +++ b/spring-backend/src/main/resources/application.properties @@ -3,10 +3,22 @@ #spring.datasource.password=admin123 #spring.jpa.generate-ddl=true -spring.datasource.url=${SPRING_DATASOURCE_URL} -spring.datasource.username=${SPRING_DATASOURCE_USERNAME} -spring.datasource.password=${SPRING_DATASOURCE_PASSWORD} -spring.jpa.generate-ddl=true +# spring.datasource.url=jdbc:mariadb://${DB_HOST}:${DB_PORT}/${DB_NAME} +spring.datasource.url=jdbc:mariadb://${DB_HOST}:${DB_PORT}/${DB_NAME}?sslMode=trust + +spring.datasource.username=${DB_USERNAME} + +spring.datasource.password=${DB_PASSWORD} + spring.jpa.hibernate.ddl-auto=update +spring.jpa.database-platform=org.hibernate.dialect.MariaDBDialect +spring.jpa.hibernate.ddl-auto=update +# spring.datasource.url=${SPRING_DATASOURCE_URL} +# spring.datasource.username=${SPRING_DATASOURCE_USERNAME} +# spring.datasource.password=${SPRING_DATASOURCE_PASSWORD} + +# spring.jpa.generate-ddl=true +# spring.jpa.hibernate.ddl-auto=update + From b4dd4d8c7a69171cc28b03027470f1446e261cca Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 10 Jun 2026 14:45:06 +0000 Subject: [PATCH 11/13] add helm-argocd-promethius-grafnaa --- backend-argocd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend-argocd.yml b/backend-argocd.yml index c5386d7..fc2ab5e 100644 --- a/backend-argocd.yml +++ b/backend-argocd.yml @@ -8,7 +8,7 @@ spec: source: repoURL: https://github.com/gauravrajlaxmi/angular-java.git - targetRevision: main + targetRevision: develop path: /angular-java/helm/backend/ helm: valueFiles: From 74bf9710dec5ecf74803786fd16b34e6496abad8 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 10 Jun 2026 14:50:15 +0000 Subject: [PATCH 12/13] add helm-argocd-promethius-grafnaa --- backend-argocd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend-argocd.yml b/backend-argocd.yml index fc2ab5e..42f09a5 100644 --- a/backend-argocd.yml +++ b/backend-argocd.yml @@ -9,10 +9,10 @@ spec: source: repoURL: https://github.com/gauravrajlaxmi/angular-java.git targetRevision: develop - path: /angular-java/helm/backend/ + path: helm/backend # ✅ IMPORTANT FIX helm: valueFiles: - - values.yml + - values.yaml destination: server: https://kubernetes.default.svc @@ -23,4 +23,4 @@ spec: prune: true selfHeal: true syncOptions: - - CreateNamespace=true + - CreateNamespace=true \ No newline at end of file From b366bb202d6d843b94267bdf8ea971f6999225ba Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Wed, 10 Jun 2026 14:53:29 +0000 Subject: [PATCH 13/13] add helm-argocd-promethius-grafnaa --- frontend-argocd.yml | 26 ++++++++++++++++++++++++++ ingress-argocd.yml | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 frontend-argocd.yml create mode 100644 ingress-argocd.yml diff --git a/frontend-argocd.yml b/frontend-argocd.yml new file mode 100644 index 0000000..3a87c3e --- /dev/null +++ b/frontend-argocd.yml @@ -0,0 +1,26 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: frontend + namespace: argocd +spec: + project: default + + source: + repoURL: https://github.com/gauravrajlaxmi/angular-java.git + targetRevision: develop + path: helm/frontend + helm: + valueFiles: + - values.yaml + + destination: + server: https://kubernetes.default.svc + namespace: apps + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file diff --git a/ingress-argocd.yml b/ingress-argocd.yml new file mode 100644 index 0000000..94a2bdc --- /dev/null +++ b/ingress-argocd.yml @@ -0,0 +1,23 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ingress + namespace: argocd +spec: + project: default + + source: + repoURL: https://github.com/gauravrajlaxmi/angular-java.git + targetRevision: develop + path: helm/ingress + + destination: + server: https://kubernetes.default.svc + namespace: apps + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true \ No newline at end of file