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

feat: Init one-color app #1

Merged
merged 11 commits into from
Sep 25, 2024
43 changes: 43 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--- Please always add a PR description as if nobody knows anything about the context these changes come from. -->
<!--- Even if we are all from our internal team, we may not be on the same page. -->
<!--- Write this PR as you were contributing to a public OSS project, where nobody knows you and you have to earn their trust. -->
<!--- This will improve our projects in the long run! Thanks. -->

### List of changes

<!--- Describe your changes in detail -->

### Motivation and context

<!--- Why is this change required? What problem does it solve? -->

### Type of changes

- [ ] Add new resources
- [ ] Update configuration to existing resources
- [ ] Remove existing resources
- [ ] Other

### Env to apply

- [x] DEV

### Does this introduce a change to production resources with possible user impact?

- [ ] Yes, users may be impacted applying this change
- [ ] No

### Does this introduce an unwanted change on infrastructure? Check terraform plan execution result

- [ ] Yes
- [ ] No

### Other information

<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->

---

### If PR is partially applied, why? (reserved to mantainers)

<!--- Describe the blocking cause -->
23 changes: 23 additions & 0 deletions helm/dev/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v2
name: applications
description: Applications

# 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.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. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: "1.0"
10 changes: 10 additions & 0 deletions helm/dev/one-color/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
name: diego-one-color
description: An example application with Java spring boot
type: application
version: 1.1.1
appVersion: 1.1.1
dependencies:
- name: microservice-chart
version: 7.1.0
repository: "https://pagopa.github.io/aks-microservice-chart-blueprint"
94 changes: 94 additions & 0 deletions helm/dev/one-color/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
microservice-chart:
namespace: "diego"

deployment:
create: true
replicas: 1

serviceAccount:
name: diego-workload-identity

envConfig:
APP: basic
MY_APP_COLOR: "green"

envSecret:
MY_KV_SECRET: dvopla-d-itn-dev-aks-apiserver-url
TEST: test

image:
repository: ghcr.io/pagopa/devops-java-springboot-color
tag: 0.10.0@sha256:3d448ec474944068f5a907a81d399cc00e9e54d42b386b55985451fcf6bf1c90
pullPolicy: Always

tmpVolumeMount:
create: true
mounts:
- name: tmp
mountPath: /tmp
- name: logs
mountPath: /app/logs

livenessProbe:
httpGet:
path: /status/live
port: 8080
initialDelaySeconds: 30
failureThreshold: 6
periodSeconds: 10

readinessProbe:
httpGet:
path: /status/ready
port: 8080
initialDelaySeconds: 30
failureThreshold: 6
periodSeconds: 10

service:
create: true
type: ClusterIP
ports:
- 8080

ingress:
create: true
host: diego.itn.internal.devopslab.pagopa.it
path: /diego/one-color(/|$)(.*)
rewriteTarget: /$2
servicePort: 8080

resources:
requests:
memory: "256Mi"
cpu: "150m"
limits:
memory: "256Mi"
cpu: "150m"

keyvault:
name: "dvopla-d-itn-diego-kv"
tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d"

podDisruptionBudget:
create: false
minAvailable: 1

affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.azure.com/mode
operator: In
values:
- user
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
aadpodidbinding: diego-pod-identity
namespaces: ["diego"]
topologyKey: topology.kubernetes.io/zone
35 changes: 35 additions & 0 deletions helm/dev/templates/one-color-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: one-color
# You'll usually want to add your resources to the argocd namespace.
namespace: argocd
# Add this finalizer ONLY if you want these to cascade delete.
finalizers:
# The default behaviour is foreground cascading deletion
- resources-finalizer.argocd.argoproj.io
# Alternatively, you can use background cascading deletion
# - resources-finalizer.argocd.argoproj.io/background
# Add labels to your application object.
labels:
name: one-color
spec:
project: '{{.Values._argocdProjectName}}'
source:
repoURL: 'https://github.com/diegolagospagopa/devopslab-diego-deploy'
path: helm/dev/one-color
targetRevision: init-charts
helm:
releaseName: init-charts
valueFiles:
- values.yaml
valuesObject:
microservice-chart:
azure:
workloadIdentityClientId: '{{.Values._azureWorkloadIdentityClientId}}'
destination:
server: 'https://kubernetes.default.svc'
namespace: diego
syncPolicy:
automated: {}
revisionHistoryLimit: 10
Loading