From b52b830f77d543aeddf55f66b16e62c1e9ac8743 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Fri, 22 Sep 2023 07:31:22 -0400 Subject: [PATCH 1/3] Add trailing newline at EOF Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- AUTHORS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index a2eb1096..9ed01ba5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1 @@ -Yaron Schneider \ No newline at end of file +Yaron Schneider From 99f9bdee3a55242eb0bc67f8ff6a4949df510b25 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Fri, 22 Sep 2023 08:36:24 -0400 Subject: [PATCH 2/3] Add markdown block types Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e74c0d9e..98c1b564 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,13 @@ Prerequisites: First, add the Osiris charts repository: -``` +```sh helm repo add osiris https://dailymotion-oss.github.io/osiris/charts ``` And then install it: -``` +```sh helm install osiris/osiris \ --name osiris \ --namespace osiris-system @@ -99,7 +99,7 @@ The following table lists the configurable parameters of the Helm chart and thei Example of installation with Helm and a custom configuration: -``` +```sh helm install osiris/osiris \ --name osiris \ --namespace osiris-system \ @@ -220,7 +220,7 @@ This is the default scraper, which doesn't need any configuration. The prometheus scraper retrieves metrics about the request count from your own prometheus endpoint. To use it, your application need to expose an endpoint with metrics in the prometheus format. You can then set the following annotation: -``` +```yaml annotations: osiris.dm.gg/metricsCollector: | { @@ -243,7 +243,7 @@ The schema of the prometheus implementation configuration is: Deploy the example application `hello-osiris` : -``` +```sh kubectl create -f ./example/hello-osiris.yaml ``` @@ -251,7 +251,7 @@ This will create an Osiris-enabled deployment and service named `hello-osiris`. Get the External IP of the `hello-osiris` service once it appears: -``` +```sh kubectl get service hello-osiris -o jsonpath='{.status.loadBalancer.ingress[*].ip}' ``` From d63504e3241e389030c36f60a0360090d3aaaf8e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Fri, 22 Sep 2023 08:36:41 -0400 Subject: [PATCH 3/3] Show annotation changes as a diff Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- README.md | 68 +++++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 98c1b564..1f266621 100644 --- a/README.md +++ b/README.md @@ -114,27 +114,27 @@ explicitly being directed to do so. To enabled the zeroscaler to scale a deployment with idling pods to zero replicas, annotate the deployment like so: -``` -apiVersion: apps/v1 -kind: Deployment -metadata: - namespace: my-aoo - name: my-app - annotations: - osiris.dm.gg/enableScaling: "true" -spec: - replicas: 1 - selector: - matchLabels: - app: my-app - template: - metadata: - labels: - app: nginx - annotations: - osiris.dm.gg/collectMetrics: "true" - # ... - # ... +```diff + apiVersion: apps/v1 + kind: Deployment + metadata: + namespace: my-aoo + name: my-app ++ annotations: ++ osiris.dm.gg/enableScaling: "true" + spec: + replicas: 1 + selector: + matchLabels: + app: my-app + template: + metadata: + labels: + app: nginx ++ annotations: ++ osiris.dm.gg/collectMetrics: "true" + # ... + # ... ``` Note that the template for the pod _also_ uses an annotation to enable Osiris-- @@ -150,19 +150,19 @@ endpoints controller. Such services must also utilize an annotation to indicate which deployment should be reactivated when the activator component intercepts a request on their behalf. For example: -``` -kind: Service -apiVersion: v1 -metadata: - namespace: my-namespace - name: my-app - annotations: - osiris.dm.gg/manageEndpoints: "true" - osiris.dm.gg/deployment: my-app -spec: - selector: - app: my-app - # ... +```diff + kind: Service + apiVersion: v1 + metadata: + namespace: my-namespace + name: my-app + annotations: ++ osiris.dm.gg/manageEndpoints: "true" ++ osiris.dm.gg/deployment: my-app + spec: + selector: + app: my-app + # ... ``` ### Configuration