Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/PageConfig.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useContext } from 'react';

import { PageContext } from '../context';
import { DocContext } from '../context';

const PageConfig = ({ children }) => {
const value = useContext(PageContext);
return children(value);
const { provisioner, deployment } = useContext(DocContext);
return children({ provisioner, deployment });
};

export default PageConfig;
33 changes: 33 additions & 0 deletions src/components/ProvisionerSelector.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react';
import FormControl from '@material-ui/core/FormControl';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import RadioGroup from '@material-ui/core/RadioGroup';
import Radio from '@material-ui/core/Radio';
import { Heading } from '@smallstep/step-ui';

const ProvisionerSelector = ({ provisioner, onProvisionerChange }) => (
<FormControl component="fieldset">
<Heading variant="h6" mb={2}>
Show me instructions for...
</Heading>
<RadioGroup
aria-label="provisioner"
name="provisioner"
value={provisioner}
onChange={onProvisionerChange}
>
<FormControlLabel
value="jwk"
control={<Radio color="primary" />}
label="Generic (password-based, etc.)"
/>
<FormControlLabel
value="acme"
control={<Radio color="primary" />}
label="ACME"
/>
</RadioGroup>
</FormControl>
);

export default ProvisionerSelector;
1 change: 0 additions & 1 deletion src/context.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { createContext } from 'react';

export const DocContext = createContext();
export const PageContext = createContext();
6 changes: 6 additions & 0 deletions src/docs/kubernetes-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
slug: kubernetes-ingress
name: Kubernetes Ingress
template: ingress
written: September 21, 2021
updated: ''
protocol: https
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Telling your ingress to make use of the certificate and private key
in the `tls-myserver` secret is as easy as adding a `tls` block
to your exsting `Ingress` resources.

```yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: myserver
labels: ...
annotations: ...
spec:
rules:
- host: myserver.example.net
http:
paths:
- backend:
serviceName: my-service
servicePort: 5000
path: /
tls:
- hosts:
- myserver.company.net
secretName: tls-myserver
```

Voila! Your ingress controller will pick up this `tls` configuration
and automatically serve the renewed certificate each time
the `tls-myserver` secret is updated.

Use `curl` to check that your TLS configuraiton is working as expected.
You'll need to pass your CA root certificate as an argument
so `curl` can verify the ingress certificate.

<CodeBlock
language="shell-session"
copyText="curl --cacert ca.crt https://myserver.example.net"
>
{`$ curl --cacert ca.crt https://myserver.example.net
HTTP/2 200
...`}
</CodeBlock>
1 change: 1 addition & 0 deletions src/docs/nginx.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
slug: nginx
name: Nginx
template: server
written: September 15, 2021
updated: ''
protocol: https
Expand Down
4 changes: 2 additions & 2 deletions src/docs/nginx/sections/40-further-reading.mdx
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- [Nginx Documentation: Configuring HTTPS servers](https://nginx.org/en/docs/http/configuring_https_servers.html)
- [Nginx Documentation: Module ngx_http_ssl_module](https://nginx.org/en/docs/http/ngx_http_ssl_module.html)
- [Nginx: Configuring HTTPS servers](https://nginx.org/en/docs/http/configuring_https_servers.html)
- [Nginx: Module ngx_http_ssl_module](https://nginx.org/en/docs/http/ngx_http_ssl_module.html)
1 change: 1 addition & 0 deletions src/docs/redis.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
slug: redis
name: Redis
template: server
written: September 20, 2021
updated: ''
protocol: RESP
Expand Down
Loading