diff --git a/Cloud-Chart/.helmignore b/Cloud-Chart/.helmignore new file mode 100644 index 0000000000000000000000000000000000000000..0e8a0eb36f4ca2c939201c0d54b5d82a1ea34778 --- /dev/null +++ b/Cloud-Chart/.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/Cloud-Chart/Chart.yaml b/Cloud-Chart/Chart.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ff538876fab11186fde0b8555120c880309e2580 --- /dev/null +++ b/Cloud-Chart/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: Cloud-Chart +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/Cloud-Chart/templates/app-deployment.yaml b/Cloud-Chart/templates/app-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..6302889e9409a0909658096011c3dc0d5962a02c --- /dev/null +++ b/Cloud-Chart/templates/app-deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -c + kompose.version: 1.27.0 (b0ed6a2c9) + creationTimestamp: null + labels: + io.kompose.service: {{ .Values.app.name }} + name: {{ .Values.app.name }} +spec: + replicas: {{ .Values.app.replicas }} + selector: + matchLabels: + io.kompose.service: {{ .Values.app.name }} + strategy: {} + template: + metadata: + annotations: + kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -c + kompose.version: 1.27.0 (b0ed6a2c9) + creationTimestamp: null + labels: + io.kompose.service: {{ .Values.app.name }} + spec: + containers: + - env: + - name: NAME + value: {{ .Values.app.name }} + image: {{ .Values.app.image }} + name: {{ .Values.app.name }} + ports: + - containerPort: {{ .Values.app.containerport }} + resources: {} + restartPolicy: Always +status: {} diff --git a/Cloud-Chart/templates/app-service.yaml b/Cloud-Chart/templates/app-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2df392ec2b3d58ca83dfb1f1fb680d32c4dae2ff --- /dev/null +++ b/Cloud-Chart/templates/app-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: app-service +spec: + ports: + - protocol: TCP + port: 5000 + targetPort: 3000 + nodePort: 31112 + type: NodePort + selector: + io.kompose.service: {{ .Values.app.name }} +status: + loadBalancer: {} diff --git a/Cloud-Chart/templates/prometheus-deployment.yaml b/Cloud-Chart/templates/prometheus-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1967030c2d41438f948369dfd5c652ceb05baa21 --- /dev/null +++ b/Cloud-Chart/templates/prometheus-deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -c + kompose.version: 1.27.0 (b0ed6a2c9) + creationTimestamp: null + labels: + io.kompose.service: {{ .Values.prometheus.name }} + name: {{ .Values.prometheus.name }} +spec: + replicas: {{ .Values.prometheus.replicas }} + selector: + matchLabels: + io.kompose.service: {{ .Values.prometheus.name }} + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -c + kompose.version: 1.27.0 (b0ed6a2c9) + creationTimestamp: null + labels: + io.kompose.service: {{ .Values.prometheus.name }} + spec: + containers: + - args: + - --config.file=/etc/prometheus/prometheus.yml + image: prom/prometheus + name: prometheus-svc + ports: + - containerPort: {{ .Values.prometheus.containerport }} + resources: {} + volumeMounts: + - mountPath: /etc/prometheus/prometheus.yml + name: prometheus-claim0 + restartPolicy: Always + volumes: + - name: prometheus-claim0 + persistentVolumeClaim: + claimName: prometheus-claim0 +status: {} diff --git a/Cloud-Chart/templates/prometheus-service.yaml b/Cloud-Chart/templates/prometheus-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b63758a89ba5570232448596b313b87a9cca6012 --- /dev/null +++ b/Cloud-Chart/templates/prometheus-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -c + kompose.version: 1.27.0 (b0ed6a2c9) + creationTimestamp: null + labels: + io.kompose.service: {{ .Values.prometheus.name }} + name: {{ .Values.prometheus.name }} +spec: + ports: + - name: "9091" + port: 9091 + targetPort: 9090 + selector: + io.kompose.service: {{ .Values.prometheus.name }} +status: + loadBalancer: {} diff --git a/Cloud-Chart/templates/redis-deployment.yaml b/Cloud-Chart/templates/redis-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d81ae8cf892389b4177cc9e63613358f99498088 --- /dev/null +++ b/Cloud-Chart/templates/redis-deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -c + kompose.version: 1.27.0 (b0ed6a2c9) + creationTimestamp: null + labels: + io.kompose.service: {{ .Values.redis.name }} + name: {{ .Values.redis.name }} +spec: + replicas: {{ .Values.redis.replicas }} + selector: + matchLabels: + io.kompose.service: {{ .Values.redis.name }} + strategy: {} + template: + metadata: + annotations: + kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -c + kompose.version: 1.27.0 (b0ed6a2c9) + creationTimestamp: null + labels: + io.kompose.service: {{ .Values.redis.name }} + spec: + containers: + - image: redis:alpine + name: {{ .Values.redis.name }} + ports: + - containerPort: {{ .Values.redis.containerport }} + resources: {} + restartPolicy: Always +status: {} diff --git a/Cloud-Chart/templates/redis-service.yaml b/Cloud-Chart/templates/redis-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..314b4f3e977ab0eb0c19615bae5bd51d95ec3a16 --- /dev/null +++ b/Cloud-Chart/templates/redis-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: C:\ProgramData\chocolatey\lib\kubernetes-kompose\tools\kompose.exe convert -c + kompose.version: 1.27.0 (b0ed6a2c9) + creationTimestamp: null + labels: + io.kompose.service: {{ .Values.redis.name }} + name: {{ .Values.redis.name }} +spec: + ports: + - name: "6379" + port: 6379 + targetPort: 6379 + selector: + io.kompose.service: {{ .Values.redis.name }} +status: + loadBalancer: {} diff --git a/Cloud-Chart/values.yaml b/Cloud-Chart/values.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ebe6e3b94d1067eda4f61c9b749e6383db6a0144 --- /dev/null +++ b/Cloud-Chart/values.yaml @@ -0,0 +1,97 @@ +# Default values for Cloud-Chart. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +app: + name: app + containerport: 3000 + replicas: 1 + image: de.icr.io/cicispace/cicirep + +redis: + name: redis + containerport: 6379 + replicas: 1 + +prometheus: + name: prometheus + replicas: 1 + containerport: 9090 + +replicaCount: 1 + +image: + repository: nginx + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: 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: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +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 + +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 + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {}