Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit fd486cb

Browse files
authored
Fixing formatting (#461)
1 parent af9ea2d commit fd486cb

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

docs/commands/data.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@
191191
"description": "Name of the resource group to create new storage account when it does not exist",
192192
"required": true
193193
},
194-
{
195-
"arg": "-k, --key-vault-name <key-vault-name>",
196-
"description": "Name of the Azure key vault"
197-
},
198194
{
199195
"arg": "--service-principal-id <service-principal-id>",
200196
"description": "Azure service principal id with `contributor` role in Azure Resource Group",
@@ -316,7 +312,7 @@
316312
"alias": "r",
317313
"description": "Reconcile a HLD with the services tracked in bedrock.yaml.",
318314
"options": [],
319-
"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"
315+
"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"
320316
},
321317
"infra generate": {
322318
"command": "generate",

src/commands/hld/reconcile.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ For a `bedrock.yaml` file that contained within the
1616
`https://dev.azure.com/foo/bar/_git` repository, that has the following
1717
structure:
1818

19-
```
19+
```yaml
2020
rings:
2121
master:
2222
isDefault: true
2323
services:
2424
./services/fabrikam:
25-
displayName: 'fabrikam'
25+
displayName: "fabrikam"
2626
k8sBackendPort: 8001
27-
k8sBackend: 'fabrikam-k8s-svc'
28-
pathPrefix: 'fabrikam-service'
29-
pathPrefixMajorVersion: 'v1'
27+
k8sBackend: "fabrikam-k8s-svc"
28+
pathPrefix: "fabrikam-service"
29+
pathPrefixMajorVersion: "v1"
3030
helm:
3131
chart:
3232
branch: master
33-
git: 'https://dev.azure.com/foo/bar/_git'
33+
git: "https://dev.azure.com/foo/bar/_git"
3434
path: stable/fabrikam-application
3535
middlewares:
36-
- ''
36+
- ""
3737
variableGroups:
3838
- fabrikam-vg
3939
```
@@ -46,15 +46,15 @@ A HLD is produced that resembles the following:
4646
├── access.yaml
4747
├── component.yaml
4848
├── config
49-
   └── common.yaml
49+
└── common.yaml
5050
└── fabrikam
5151
├── component.yaml
5252
├── config
53-
   └── common.yaml
53+
└── common.yaml
5454
└── master
5555
├── component.yaml
5656
├── config
57-
   └── common.yaml
57+
└── common.yaml
5858
└── static
5959
├── ingress-route.yaml
6060
└── middlewares.yaml
@@ -68,15 +68,15 @@ that strips path prefixes.
6868

6969
For the `bedrock.yaml` shown above, the `ingress-route.yaml` produced is:
7070

71-
```
71+
```yaml
7272
apiVersion: traefik.containo.us/v1alpha1
7373
kind: IngressRoute
7474
metadata:
7575
name: fabrikam-master
7676
spec:
7777
routes:
7878
- kind: Rule
79-
match: 'PathPrefix(`/v1/fabrikam-service`) && Headers(`Ring`, `master`)'
79+
match: "PathPrefix(`/v1/fabrikam-service`) && Headers(`Ring`, `master`)"
8080
middlewares:
8181
- name: fabrikam-master
8282
services:
@@ -86,7 +86,7 @@ spec:
8686
8787
And the `middlewares.yaml` produced is:
8888

89-
```
89+
```yaml
9090
apiVersion: traefik.containo.us/v1alpha1
9191
kind: Middleware
9292
metadata:
@@ -104,8 +104,8 @@ Note that there exists a third generated file, `access.yaml`. For the above
104104
allowing Fabrikate to pull Helm Charts that are contained within the same
105105
application repository:
106106

107-
```
108-
'https://dev.azure.com/foo/bar/_git': ACCESS_TOKEN_SECRET
107+
```yaml
108+
"https://dev.azure.com/foo/bar/_git": ACCESS_TOKEN_SECRET
109109
```
110110

111111
When `fabrikate` is invoked in the HLD to Manifest pipeline, it will utilize the

0 commit comments

Comments
 (0)