-
Notifications
You must be signed in to change notification settings - Fork 1
Update dummy server #4
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
Open
apittaro-et
wants to merge
6
commits into
master
Choose a base branch
from
update-dummy-server-20230530
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7108695
create kubernetes charts to deploy the dummy webserver with alb ingre…
hellska bb0323b
fix webserver deployment in ec5-stage
apittaro-et 4b5df7f
Update version to 0.7.0, adjust service ports, and improve Dockerfile
matteoipri f54f89e
fixed ports from matteo's updated template, using
apittaro-et dc08dc1
fixed ingress and port mapping ; fixed handler
apittaro-et 8b1d590
increasing dev version to 0.8.0
apittaro-et File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,4 +112,6 @@ dmypy.json | |
|
|
||
| # Editors | ||
| .sonarlint | ||
| .vscode | ||
| .vscode | ||
|
|
||
| .DS_Store | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
charts/dummyserver-stage-config/dummyserver-stage-config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| service: | ||
| type: LoadBalancer | ||
| httpPort: 80 | ||
| httpsPort: 443 | ||
| mgmtPort: 8004 | ||
|
|
||
| image: | ||
| tag: "0.7.0" | ||
| pullPolicy: Always | ||
|
|
||
| ingress: | ||
| enabled: false | ||
| host: dummy-webserver.dev.everyware.io | ||
|
|
||
| className: alb | ||
| basePath: / | ||
| # backend: | ||
| # serviceName: ec-console | ||
| # servicePort: 8080 | ||
| annotations: | ||
| # Simple configuration for AWS ALB Ingress Controller (https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/ingress/annotation/) | ||
| alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-1:332696098873:certificate/1021f82e-83ad-420e-bac9-f6640d89e129 | ||
| alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]' | ||
| alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}' | ||
| alb.ingress.kubernetes.io/scheme: internet-facing | ||
| alb.ingress.kubernetes.io/target-type: ip | ||
| alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-FS-1-2-2019-08 | ||
| alb.ingress.kubernetes.io/group.name: everyware-cloud-stage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,163 @@ | ||
| NAME: dummyserver | ||
| LAST DEPLOYED: Fri Jun 9 11:47:20 2023 | ||
| NAMESPACE: default | ||
| STATUS: pending-install | ||
| REVISION: 1 | ||
| HOOKS: | ||
| --- | ||
| # Source: dummyserver/templates/tests/test-connection.yaml | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: "dummyserver-test-connection" | ||
| labels: | ||
| helm.sh/chart: dummyserver-0.1.0 | ||
| app.kubernetes.io/name: dummyserver | ||
| app.kubernetes.io/instance: dummyserver | ||
| app.kubernetes.io/version: "0.6.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| annotations: | ||
| "helm.sh/hook": test | ||
| spec: | ||
| containers: | ||
| - name: wget | ||
| image: busybox | ||
| command: ['wget'] | ||
| args: ['dummyserver:'] | ||
| restartPolicy: Never | ||
| MANIFEST: | ||
| --- | ||
| # Source: dummyserver/templates/service.yaml | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: dummyserver | ||
| labels: | ||
| helm.sh/chart: dummyserver-0.1.0 | ||
| app.kubernetes.io/name: dummyserver | ||
| app.kubernetes.io/instance: dummyserver | ||
| app.kubernetes.io/version: "0.6.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| spec: | ||
| type: ClusterIP | ||
| ports: | ||
| - port: 8001 | ||
| targetPort: 8001 | ||
| protocol: TCP | ||
| name: http | ||
| - port: 8002 | ||
| targetPort: 8002 | ||
| protocol: TCP | ||
| name: https | ||
| - port: 8004 | ||
| targetPort: 8004 | ||
| protocol: TCP | ||
| name: mgmt | ||
| selector: | ||
| app.kubernetes.io/name: dummyserver | ||
| app.kubernetes.io/instance: dummyserver | ||
| --- | ||
| # Source: dummyserver/templates/deployment.yaml | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: dummyserver | ||
| labels: | ||
| helm.sh/chart: dummyserver-0.1.0 | ||
| app.kubernetes.io/name: dummyserver | ||
| app.kubernetes.io/instance: dummyserver | ||
| app.kubernetes.io/version: "0.6.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app.kubernetes.io/name: dummyserver | ||
| app.kubernetes.io/instance: dummyserver | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app.kubernetes.io/name: dummyserver | ||
| app.kubernetes.io/instance: dummyserver | ||
| spec: | ||
| securityContext: | ||
| {} | ||
| containers: | ||
| - name: dummyserver | ||
| securityContext: | ||
| {} | ||
| image: "public.ecr.aws/eurotech-dev/dummy-webserver:0.6.0:0.6.0" | ||
| imagePullPolicy: IfNotPresent | ||
| ports: | ||
| - name: http | ||
| containerPort: 8001 | ||
| protocol: TCP | ||
| - name: https | ||
| containerPort: 8002 | ||
| protocol: TCP | ||
| - name: mgmtport | ||
| containerPort: 8004 | ||
| protocol: TCP | ||
| ## livenessProbe: | ||
| ## httpGet: | ||
| ## path: /liveness | ||
| ## port: http | ||
| ## readinessProbe: | ||
| ## httpGet: | ||
| ## path: /readyness | ||
| ## port: http | ||
| resources: | ||
| {} | ||
| --- | ||
| # Source: dummyserver/templates/ingress.yaml | ||
| kind: Ingress | ||
| apiVersion: networking.k8s.io/v1 | ||
| metadata: | ||
| name: dummyserver | ||
| labels: | ||
| helm.sh/chart: dummyserver-0.1.0 | ||
| app.kubernetes.io/name: dummyserver | ||
| app.kubernetes.io/instance: dummyserver | ||
| app.kubernetes.io/version: "0.6.0" | ||
| app.kubernetes.io/managed-by: Helm | ||
| annotations: | ||
| alb.ingress.kubernetes.io/listen-ports: "[{\"HTTP\": 80}]" | ||
| alb.ingress.kubernetes.io/scheme: "internet-facing" | ||
| alb.ingress.kubernetes.io/target-type: "ip" | ||
| spec: | ||
| ingressClassName: alb | ||
| rules: | ||
| - http: | ||
| paths: | ||
| - pathType: Prefix | ||
| path: /stats | ||
| backend: | ||
| service: | ||
| name: dummyserver | ||
| port: | ||
| number: 8004 | ||
| - pathType: Prefix | ||
| path: /history | ||
| backend: | ||
| service: | ||
| name: dummyserver | ||
| port: | ||
| number: 8004 | ||
| - pathType: Prefix | ||
| path: /clear | ||
| backend: | ||
| service: | ||
| name: dummyserver | ||
| port: | ||
| number: 8004 | ||
| - pathType: Prefix | ||
| path: / | ||
| backend: | ||
| service: | ||
| name: dummyserver | ||
| port: | ||
| number: 8001 | ||
|
|
||
| NOTES: | ||
| 1. Get the application URL by running these commands: | ||
| http://chart-example.local/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| apiVersion: v2 | ||
| name: dummyserver | ||
| 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: "0.6.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| 1. Get the application URL by running these commands: | ||
| {{- if .Values.ingress.enabled }} | ||
| {{- range .paths }} | ||
| http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.host }}{{ .path }} | ||
| {{- end }} | ||
| {{- else if contains "NodePort" .Values.service.type }} | ||
| export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "dummyserver.fullname" . }}) | ||
| export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
| echo http://$NODE_IP:$NODE_PORT | ||
| {{- else if contains "LoadBalancer" .Values.service.type }} | ||
| NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
| You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "dummyserver.fullname" . }}' | ||
| export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "dummyserver.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
| echo http://$SERVICE_IP:{{ .Values.service.port }} | ||
| {{- else if contains "ClusterIP" .Values.service.type }} | ||
| export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "dummyserver.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}") | ||
| echo "Visit http://127.0.0.1:8001 to use your application" | ||
| kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8001:$CONTAINER_PORT | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "dummyserver.name" -}} | ||
| {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create a default fully qualified app name. | ||
| We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
| If release name contains chart name it will be used as a full name. | ||
| */}} | ||
| {{- define "dummyserver.fullname" -}} | ||
| {{- if .Values.fullnameOverride }} | ||
| {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- $name := default .Chart.Name .Values.nameOverride }} | ||
| {{- if contains $name .Release.Name }} | ||
| {{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
| {{- else }} | ||
| {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create chart name and version as used by the chart label. | ||
| */}} | ||
| {{- define "dummyserver.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "dummyserver.labels" -}} | ||
| helm.sh/chart: {{ include "dummyserver.chart" . }} | ||
| {{ include "dummyserver.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "dummyserver.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "dummyserver.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "dummyserver.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "dummyserver.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image tag appears to be duplicated. Please update it to a single version tag, for example: "public.ecr.aws/eurotech-dev/dummy-webserver:0.6.0".