From 6d8669a3b369f98225cec2f0737cf70eae76ae07 Mon Sep 17 00:00:00 2001 From: chengzw Date: Sat, 11 Nov 2023 22:40:44 +0800 Subject: [PATCH] fix typo ngnix to nginx Signed-off-by: chengzw --- abstraction/README.md | 12 ++++++------ abstraction/main.k | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/abstraction/README.md b/abstraction/README.md index 62eb812..de9b821 100644 --- a/abstraction/README.md +++ b/abstraction/README.md @@ -21,15 +21,15 @@ import .app app.App { name = "app" - containers.ngnix = { - image = "ngnix" + containers.nginx = { + image = "nginx" ports = [{containerPort = 80}] } service.ports = [{ port = 80 }] } ``` -In the above code, we defined a configuration using the `App` schema, where we configured an `ngnix` container and configured it with an `80` service port. +In the above code, we defined a configuration using the `App` schema, where we configured an `nginx` container and configured it with an `80` service port. Besides, KCL allows developers to define the resources required for their applications in a declarative manner and is tied to a platform such as Docker Compose or Kubernetes manifests and allows to generate a platform-specific configuration file such as `docker-compose.yaml` or a Kubernetes `manifests.yaml` file. Next, let's generate the corresponding configuration. @@ -46,7 +46,7 @@ The output is ```yaml services: app: - image: ngnix + image: nginx ports: - published: 80 target: 80 @@ -81,8 +81,8 @@ spec: app: app spec: containers: - - name: ngnix - image: ngnix + - name: nginx + image: nginx ports: - protocol: TCP containerPort: 80 diff --git a/abstraction/main.k b/abstraction/main.k index 00fc349..48a0697 100644 --- a/abstraction/main.k +++ b/abstraction/main.k @@ -2,8 +2,8 @@ import .app app.App { name = "app" - containers.ngnix = { - image = "ngnix" + containers.nginx = { + image = "nginx" ports = [{containerPort = 80}] } service.ports = [{ port = 80 }]