diff --git a/docs/commands/data.json b/docs/commands/data.json index f47cf1117..38057dc8f 100644 --- a/docs/commands/data.json +++ b/docs/commands/data.json @@ -191,10 +191,6 @@ "description": "Name of the resource group to create new storage account when it does not exist", "required": true }, - { - "arg": "-k, --key-vault-name ", - "description": "Name of the Azure key vault" - }, { "arg": "--service-principal-id ", "description": "Azure service principal id with `contributor` role in Azure Resource Group", @@ -316,7 +312,7 @@ "alias": "r", "description": "Reconcile a HLD with the services tracked in bedrock.yaml.", "options": [], - "markdown": "## Description\n\nThe reconcile feature scaffolds a HLD with the services in the `bedrock.yaml`\nfile at the root level of the application repository. Recall that in a\nmono-repo, `spk service create` will add an entry into the `bedrock.yaml`\ncorresponding to all tracked services. When the service has been merged into\n`master` of the application repository, a pipeline (see `hld-lifecycle.yaml`,\ncreated by `spk project init`) runs `spk hld reconcile` to add any _new_\nservices tracked in `bedrock.yaml` to the HLD.\n\nThis command is _intended_ to be run in a pipeline (see the generated\n`hld-lifecycle.yaml` created from `spk project init`), but can be run by the\nuser in a CLI for verification.\n\nFor a `bedrock.yaml` file that contained within the\n`https://dev.azure.com/foo/bar/_git` repository, that has the following\nstructure:\n\n```\nrings:\n master:\n isDefault: true\nservices:\n ./services/fabrikam:\n displayName: 'fabrikam'\n k8sBackendPort: 8001\n k8sBackend: 'fabrikam-k8s-svc'\n pathPrefix: 'fabrikam-service'\n pathPrefixMajorVersion: 'v1'\n helm:\n chart:\n branch: master\n git: 'https://dev.azure.com/foo/bar/_git'\n path: stable/fabrikam-application\n middlewares:\n - ''\nvariableGroups:\n - fabrikam-vg\n```\n\nA HLD is produced that resembles the following:\n\n```\n├── component.yaml\n└── fabrikam\n ├── access.yaml\n ├── component.yaml\n ├── config\n │   └── common.yaml\n └── fabrikam\n ├── component.yaml\n ├── config\n │   └── common.yaml\n └── master\n ├── component.yaml\n ├── config\n │   └── common.yaml\n └── static\n ├── ingress-route.yaml\n └── middlewares.yaml\n```\n\nWith the `ingress-route.yaml` representing a\n[Traefik2 Ingress Route](https://docs.traefik.io/routing/providers/kubernetes-crd/#kind-ingressroute)\nbacked by a Kubernetes Service, and the `middlewares.yaml` representing a\n[Traefik2 Middleware](https://docs.traefik.io/routing/providers/kubernetes-crd/#kind-middleware)\nthat strips path prefixes.\n\nFor the `bedrock.yaml` shown above, the `ingress-route.yaml` produced is:\n\n```\napiVersion: traefik.containo.us/v1alpha1\nkind: IngressRoute\nmetadata:\n name: fabrikam-master\nspec:\n routes:\n - kind: Rule\n match: 'PathPrefix(`/v1/fabrikam-service`) && Headers(`Ring`, `master`)'\n middlewares:\n - name: fabrikam-master\n services:\n - name: fabrikam-k8s-svc-master\n port: 8001\n```\n\nAnd the `middlewares.yaml` produced is:\n\n```\napiVersion: traefik.containo.us/v1alpha1\nkind: Middleware\nmetadata:\n name: fabrikam-master\nspec:\n stripPrefix:\n forceSlash: false\n prefixes:\n - /v1/fabrikam-service\n```\n\nNote that there exists a third generated file, `access.yaml`. For the above\n`bedrock.yaml`, `access.yaml` contains a single line, which represents a\n[Fabrikate access.yaml definition](https://github.com/microsoft/fabrikate/blob/master/docs/auth.md#accessyaml),\nallowing Fabrikate to pull Helm Charts that are contained within the same\napplication repository:\n\n```\n'https://dev.azure.com/foo/bar/_git': ACCESS_TOKEN_SECRET\n```\n\nWhen `fabrikate` is invoked in the HLD to Manifest pipeline, it will utilize the\n`ACCESS_TOKEN_SECRET` environment variable injected at pipeline run-time as a\nPersonal Access Token to pull any referenced helm charts from the application\nrepository.\n" + "markdown": "## Description\n\nThe reconcile feature scaffolds a HLD with the services in the `bedrock.yaml`\nfile at the root level of the application repository. Recall that in a\nmono-repo, `spk service create` will add an entry into the `bedrock.yaml`\ncorresponding to all tracked services. When the service has been merged into\n`master` of the application repository, a pipeline (see `hld-lifecycle.yaml`,\ncreated by `spk project init`) runs `spk hld reconcile` to add any _new_\nservices tracked in `bedrock.yaml` to the HLD.\n\nThis command is _intended_ to be run in a pipeline (see the generated\n`hld-lifecycle.yaml` created from `spk project init`), but can be run by the\nuser in a CLI for verification.\n\nFor a `bedrock.yaml` file that contained within the\n`https://dev.azure.com/foo/bar/_git` repository, that has the following\nstructure:\n\n```yaml\nrings:\n master:\n isDefault: true\nservices:\n ./services/fabrikam:\n displayName: \"fabrikam\"\n k8sBackendPort: 8001\n k8sBackend: \"fabrikam-k8s-svc\"\n pathPrefix: \"fabrikam-service\"\n pathPrefixMajorVersion: \"v1\"\n helm:\n chart:\n branch: master\n git: \"https://dev.azure.com/foo/bar/_git\"\n path: stable/fabrikam-application\n middlewares:\n - \"\"\nvariableGroups:\n - fabrikam-vg\n```\n\nA HLD is produced that resembles the following:\n\n```\n├── component.yaml\n└── fabrikam\n ├── access.yaml\n ├── component.yaml\n ├── config\n │ └── common.yaml\n └── fabrikam\n ├── component.yaml\n ├── config\n │ └── common.yaml\n └── master\n ├── component.yaml\n ├── config\n │ └── common.yaml\n └── static\n ├── ingress-route.yaml\n └── middlewares.yaml\n```\n\nWith the `ingress-route.yaml` representing a\n[Traefik2 Ingress Route](https://docs.traefik.io/routing/providers/kubernetes-crd/#kind-ingressroute)\nbacked by a Kubernetes Service, and the `middlewares.yaml` representing a\n[Traefik2 Middleware](https://docs.traefik.io/routing/providers/kubernetes-crd/#kind-middleware)\nthat strips path prefixes.\n\nFor the `bedrock.yaml` shown above, the `ingress-route.yaml` produced is:\n\n```yaml\napiVersion: traefik.containo.us/v1alpha1\nkind: IngressRoute\nmetadata:\n name: fabrikam-master\nspec:\n routes:\n - kind: Rule\n match: \"PathPrefix(`/v1/fabrikam-service`) && Headers(`Ring`, `master`)\"\n middlewares:\n - name: fabrikam-master\n services:\n - name: fabrikam-k8s-svc-master\n port: 8001\n```\n\nAnd the `middlewares.yaml` produced is:\n\n```yaml\napiVersion: traefik.containo.us/v1alpha1\nkind: Middleware\nmetadata:\n name: fabrikam-master\nspec:\n stripPrefix:\n forceSlash: false\n prefixes:\n - /v1/fabrikam-service\n```\n\nNote that there exists a third generated file, `access.yaml`. For the above\n`bedrock.yaml`, `access.yaml` contains a single line, which represents a\n[Fabrikate access.yaml definition](https://github.com/microsoft/fabrikate/blob/master/docs/auth.md#accessyaml),\nallowing Fabrikate to pull Helm Charts that are contained within the same\napplication repository:\n\n```yaml\n\"https://dev.azure.com/foo/bar/_git\": ACCESS_TOKEN_SECRET\n```\n\nWhen `fabrikate` is invoked in the HLD to Manifest pipeline, it will utilize the\n`ACCESS_TOKEN_SECRET` environment variable injected at pipeline run-time as a\nPersonal Access Token to pull any referenced helm charts from the application\nrepository.\n" }, "infra generate": { "command": "generate", diff --git a/src/commands/hld/reconcile.md b/src/commands/hld/reconcile.md index 8a257af13..392711c1b 100644 --- a/src/commands/hld/reconcile.md +++ b/src/commands/hld/reconcile.md @@ -16,24 +16,24 @@ For a `bedrock.yaml` file that contained within the `https://dev.azure.com/foo/bar/_git` repository, that has the following structure: -``` +```yaml rings: master: isDefault: true services: ./services/fabrikam: - displayName: 'fabrikam' + displayName: "fabrikam" k8sBackendPort: 8001 - k8sBackend: 'fabrikam-k8s-svc' - pathPrefix: 'fabrikam-service' - pathPrefixMajorVersion: 'v1' + k8sBackend: "fabrikam-k8s-svc" + pathPrefix: "fabrikam-service" + pathPrefixMajorVersion: "v1" helm: chart: branch: master - git: 'https://dev.azure.com/foo/bar/_git' + git: "https://dev.azure.com/foo/bar/_git" path: stable/fabrikam-application middlewares: - - '' + - "" variableGroups: - fabrikam-vg ``` @@ -46,15 +46,15 @@ A HLD is produced that resembles the following: ├── access.yaml ├── component.yaml ├── config - │   └── common.yaml + │ └── common.yaml └── fabrikam ├── component.yaml ├── config - │   └── common.yaml + │ └── common.yaml └── master ├── component.yaml ├── config - │   └── common.yaml + │ └── common.yaml └── static ├── ingress-route.yaml └── middlewares.yaml @@ -68,7 +68,7 @@ that strips path prefixes. For the `bedrock.yaml` shown above, the `ingress-route.yaml` produced is: -``` +```yaml apiVersion: traefik.containo.us/v1alpha1 kind: IngressRoute metadata: @@ -76,7 +76,7 @@ metadata: spec: routes: - kind: Rule - match: 'PathPrefix(`/v1/fabrikam-service`) && Headers(`Ring`, `master`)' + match: "PathPrefix(`/v1/fabrikam-service`) && Headers(`Ring`, `master`)" middlewares: - name: fabrikam-master services: @@ -86,7 +86,7 @@ spec: And the `middlewares.yaml` produced is: -``` +```yaml apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: @@ -104,8 +104,8 @@ Note that there exists a third generated file, `access.yaml`. For the above allowing Fabrikate to pull Helm Charts that are contained within the same application repository: -``` -'https://dev.azure.com/foo/bar/_git': ACCESS_TOKEN_SECRET +```yaml +"https://dev.azure.com/foo/bar/_git": ACCESS_TOKEN_SECRET ``` When `fabrikate` is invoked in the HLD to Manifest pipeline, it will utilize the