-
Notifications
You must be signed in to change notification settings - Fork 29
Quick start updates #3439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paigecalvert
wants to merge
29
commits into
main
Choose a base branch
from
quick-start-updates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Quick start updates #3439
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
e698efa
update quick start with slackernews
paigecalvert 5f4c0e3
steps for getting smaple chart
paigecalvert 2c43af7
edits
paigecalvert d766666
edits
paigecalvert 7bb605b
edits
paigecalvert 5bbf003
edits and update tar
paigecalvert fcdacc9
rm slackernews archive to publish them in different pr
paigecalvert 9b13b06
edits
paigecalvert 0645577
edits
paigecalvert a0f35db
edits
paigecalvert f8ab6aa
edits
paigecalvert 6caaae7
adding screenshots
paigecalvert 8c72e01
adding screenshots
paigecalvert 66f5650
adding screenshots
paigecalvert 18f550e
adding screenshots
paigecalvert 4d6125e
edits
paigecalvert 3a59d01
fix untar command
paigecalvert a770e3c
edits
paigecalvert 26a0a9d
update kots and k8s app yaml
paigecalvert 091ba16
edit ingress and port info
paigecalvert 45fa69a
edit config page instructions
paigecalvert ed3f90e
editing release yaml
paigecalvert ffcaa36
various edits
paigecalvert 7a3ea51
edit related topics links
paigecalvert 3b1a116
edit prerequisites
paigecalvert 625ed6f
edits
paigecalvert cbb7b33
add screenshot and fix typos
paigecalvert d70348f
quick start edits
paigecalvert 28954d9
edit
paigecalvert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
```yaml | ||
apiVersion: kots.io/v1beta2 | ||
kind: HelmChart | ||
metadata: | ||
name: slackernews | ||
spec: | ||
# chart identifies a matching chart from a .tgz | ||
chart: | ||
name: slackernews | ||
chartVersion: 1.0.0 | ||
namespace: slackernews | ||
|
||
# values are used in the customer environment, as a pre-render step | ||
# these values will be supplied to helm template | ||
values: | ||
postgres: | ||
enabled: true | ||
deploy_postgres: repl{{ ConfigOption "deploy_postgres" | ParseBool }} | ||
slack: | ||
botToken: repl{{ ConfigOption "slack_bot_token" | quote }} | ||
userToken: repl{{ ConfigOption "slack_user_token" | quote }} | ||
clientId: repl{{ ConfigOption "slack_clientid" | quote }} | ||
clientSecret: repl{{ ConfigOption "slack_clientsecret" | quote }} | ||
slackernews: | ||
domain: repl{{ ConfigOption "slackernews_domain" }} | ||
adminUserEmails: repl{{ ConfigOption "slackernews_admin_user_emails" | quote }} | ||
admin-console: | ||
enabled: false | ||
replicated: | ||
isEmbeddedCluster: repl{{ eq Distribution "embedded-cluster"}} | ||
isKOTSManaged: true | ||
imagePullSecrets: | ||
- name: '{{repl ImagePullSecretName }}' | ||
service: | ||
tls: | ||
enabled: true | ||
nginx: | ||
enabled: true | ||
images: | ||
pullSecrets: | ||
- name: '{{repl ImagePullSecretName }}' | ||
|
||
optionalValues: | ||
# load images from the local registry in an air-gapped environment | ||
- when: '{{repl HasLocalRegistry }}' | ||
recursiveMerge: true | ||
values: | ||
replicated: | ||
isAirgap: true | ||
image: | ||
registry: '{{repl LocalRegistryHost }}' | ||
repository: '{{repl LocalRegistryNamespace }}/replicated-sdk-image' | ||
slackernews: | ||
registry: '{{repl LocalRegistryHost}}' | ||
repository: '{{LocalRegistryNamespace}}/slackernews-web' | ||
nginx: | ||
registry: '{{repl LocalRegistryHost}}' | ||
repository: '{{LocalRegistryNamespace}}/nginx' | ||
postgres: | ||
registry: '{{repl LocalRegistryHost}}' | ||
repository: '{{LocalRegistryNamespace}}/postgres' | ||
|
||
# the user wants us to deploy a local Postgres instance | ||
- when: '{{repl ConfigOptionEquals "deploy_postgres" "1"}}' | ||
recursiveMerge: true | ||
values: | ||
postgres: | ||
password: '{{repl ConfigOption "postgres_password" }}' | ||
|
||
# the user provided their own Postgres instance | ||
- when: '{{repl ConfigOptionEquals "deploy_postgres" "0"}}' | ||
recursiveMerge: true | ||
values: | ||
postgres: | ||
uri: '{{repl ConfigOption "postgres_external_uri" }}' | ||
|
||
# use the user-provided certificates | ||
- when: '{{repl ConfigOptionEquals "certificate_source" "upload_existing"}}' | ||
recursiveMerge: true | ||
values: | ||
service: | ||
tls: | ||
enabled: true | ||
cert: repl{{ ConfigOptionData "tls_cert" | nindent 14 }} | ||
key: repl{{ ConfigOptionData "tls_key" | nindent 14 }} | ||
ca: repl{{ ConfigOptionData "tls_ca" | nindent 14 }} | ||
|
||
# or generate our own | ||
- when: '{{repl ConfigOptionEquals "certificate_source" "generate_internal"}}' | ||
recursiveMerge: true | ||
values: | ||
service: | ||
tls: | ||
enabled: true | ||
ca: |- | ||
{{repl $ca := genCA (LicenseFieldValue "customerName") 365 }} | ||
{{repl $ca.Cert | Base64Encode}} | ||
cert: |- | ||
{{repl $cert := genSignedCert (ConfigOption "slackernews_domain") nil (list (ConfigOption "slackernews_domain")) 365 $ca }} | ||
{{repl $cert.Cert | nindent 14 }} | ||
key: |- | ||
{{repl $cert.Key | nindent 14 }} | ||
|
||
# handle different service types | ||
- when: '{{repl ConfigOptionEquals "service_type" "cluster_ip"}}' | ||
recursiveMerge: true | ||
values: | ||
nginx: | ||
service: | ||
type: ClusterIP | ||
|
||
- when: '{{repl ConfigOptionEquals "service_type" "load_balancer"}}' | ||
recursiveMerge: true | ||
values: | ||
nginx: | ||
service: | ||
type: LoadBalancer | ||
|
||
- when: '{{repl ConfigOptionEquals "service_type" "node_port"}}' | ||
recursiveMerge: true | ||
values: | ||
nginx: | ||
service: | ||
type: NodePort | ||
nodePort: | ||
port: repl{{ ConfigOption "node_port_port" }} | ||
|
||
|
||
|
||
# builder values provide a way to render the chart with all images | ||
# and manifests. this is used in Replicated to create airgap packages | ||
builder: | ||
postgres: | ||
password: this-is-not-used-but-needed-for-builder | ||
deploy_postgres: true | ||
enabled: true | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
```yaml | ||
apiVersion: kots.io/v1beta1 | ||
kind: Config | ||
metadata: | ||
name: slackernews-config | ||
spec: | ||
groups: | ||
- name: slackernews | ||
title: Application Core | ||
description: | | ||
For this section, you can specify some core parameters for how | ||
Slackernews operates, including the domain where users will access it | ||
and the user who can administer it. | ||
|
||
Users that you specify under **Admin Users** will be able to access the | ||
Slackernews adminstrative console at `/admin`, allowing them to manage | ||
content, users, and settings. Changes will take effect the next time | ||
they are active in the Slackernews application. | ||
items: | ||
- name: slackernews_domain | ||
title: Ingress Hostname | ||
help_text: > | ||
The domain name at which you'll access SlackerNews. Don't include | ||
the `https://` or any path elements. | ||
type: text | ||
required: true | ||
# validation: | ||
# regex: | ||
# pattern: ^(?!-)[A-Za-z0-9-]{1,63}(?<!-)(\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*\.[A-Za-z]{2,}$ | ||
# message: Please enter a valid hostname | ||
- name: slackernews_admin_user_emails | ||
title: Admin Users | ||
type: text | ||
help_text: > | ||
Provide a comma-separated list of email addresses for the users you | ||
want to grant admin access to. | ||
|
||
- name: ingress | ||
title: Application Access | ||
description: | | ||
You can customize how you will expose SlackerNews to the internet. | ||
Note that the domain you use will need to be publicly addressable with certs signed by a public authority | ||
so it can receive webhooks from Slack. | ||
|
||
Common configurations include: | ||
|
||
- **ClusterIP** Using a Cluster IP and configuring your existing ingress controller to route traffic to SlackerNews | ||
- **NodePort** Using a NodePort and configuring an existing load balancer to route traffic to SlackerNews | ||
- **LoadBalancer** Using a LoadBalancer service and letting Kubernetes provision a load balancer for you | ||
|
||
If you're running in a supported cloud provider and want Kubernetes to provision a Load Balancer, use LoadBalancer. | ||
items: | ||
- name: service_type | ||
title: Service Type | ||
type: select_one | ||
items: | ||
- name: cluster_ip | ||
title: ClusterIP | ||
- name: node_port | ||
title: NodePort | ||
- name: load_balancer | ||
title: LoadBalancer | ||
default: cluster_ip | ||
- name: node_port_port | ||
title: Node Port | ||
help_text: > | ||
(Optional) - The port to use for the NodePort service type. Leave this blank to have Kubernetes choose a port for you. | ||
type: text | ||
default: "443" | ||
when: repl{{ ConfigOptionEquals "service_type" "node_port" }} | ||
|
||
- name: tls | ||
title: Certificates | ||
description: | | ||
You can secure the Slackernews application with certificates from a trusted certificate authority | ||
or we can generate them for you. We recommend that you upload your own certificates for production installations. | ||
items: | ||
- name: certificate_source | ||
type: select_one | ||
title: Certificate Source | ||
default: generate_internal | ||
items: | ||
- name: generate_internal | ||
title: Generate | ||
- name: upload_existing | ||
title: Upload | ||
- name: tls_cert | ||
title: Certificate | ||
type: file | ||
when: '{{repl ConfigOptionEquals "certificate_source" "upload_existing"}}' | ||
- name: tls_key | ||
title: Private Key | ||
type: file | ||
when: '{{repl ConfigOptionEquals "certificate_source" "upload_existing"}}' | ||
- name: tls_ca | ||
title: Signing Authority | ||
type: file | ||
when: '{{repl ConfigOptionEquals "certificate_source" "upload_existing"}}' | ||
|
||
- name: slack | ||
title: Slack Settings | ||
description: | | ||
If desired, you can preconfigure the slack settings for SlackerNews. | ||
These are required for logging into SlackerNews and pulling/organizing content from your slack instance. | ||
If you don't preconfigure these settings, you'll be prompted to configure them when you first access SlackerNews. | ||
|
||
Instructions on how to configure your slack application and collect these values can be found in [the SlackerNews slack documentation](https://docs.slackernews.io/slack/). | ||
items: | ||
- name: slack_clientid | ||
title: Slack Client ID | ||
type: text | ||
- name: slack_clientsecret | ||
title: Slack Client Secret | ||
type: password | ||
- name: slack_user_token | ||
title: User OAuth Token | ||
type: password | ||
validation: | ||
regex: | ||
pattern: ^xoxp-.*$ | ||
message: Please enter the Slack user token for your instance of Slackernews | ||
- name: slack_bot_token | ||
title: Bot User OAuth Token | ||
type: password | ||
validation: | ||
regex: | ||
pattern: ^xoxb-.*$ | ||
message: Please enter the Slack bot token for your instance of Slackernews | ||
|
||
- name: postgres | ||
description: > | ||
This section can be used to configure the postgresql database required by SlackerNews. You | ||
can either deploy postgresql as part of the installation or provide an external URI to an existing postgresql instance | ||
that you will use for SlackerNews. | ||
title: Postgresql | ||
items: | ||
- name: deploy_postgres | ||
type: bool | ||
title: Deploy Postgresql Database | ||
default: "1" | ||
- name: postgres_password | ||
type: password | ||
title: Postgresql Password | ||
required: true | ||
hidden: true | ||
when: repl{{ ConfigOptionEquals "deploy_postgres" "1"}} | ||
value: repl{{ RandomString 40}} | ||
- name: postgres_external_uri | ||
type: text | ||
title: Postgresql URI | ||
required: true | ||
when: repl{{ ConfigOptionEquals "deploy_postgres" "0"}} | ||
``` |
6 changes: 6 additions & 0 deletions
6
docs/partials/getting-started/_slackernews-embedded-cluster.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
```yaml | ||
apiVersion: embeddedcluster.replicated.com/v1beta1 | ||
kind: Config | ||
spec: | ||
version: 2.10.0+k8s-1.33 | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
```yaml | ||
apiVersion: app.k8s.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: "slackernews" | ||
annotations: | ||
kots.io/exclude: "true" | ||
labels: | ||
app.kubernetes.io/name: "slackernews" | ||
app.kubernetes.io/version: "0.0.1" | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: "slackernews" | ||
componentKinds: | ||
- group: core | ||
kind: Service | ||
- group: apps | ||
kind: Deployment | ||
descriptor: | ||
version: "1.0.0" | ||
description: "SlackerNews" | ||
icons: | ||
- src: "https://uploads-ssl.webflow.com/6310ad0e6a18aa1620da6ae8/6330e04f42bc6a7ba03b4725_snicon.png" | ||
type: "image/png" | ||
type: slackernews | ||
links: | ||
- description: 🔗 Open Slackernews | ||
url: 'https://{{repl ConfigOption "slackernews_domain" }}' | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
```yaml | ||
apiVersion: kots.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: slackernews | ||
annotations: | ||
kots.io/exclude: "true" | ||
spec: | ||
title: SlackerNews | ||
icon: "https://uploads-ssl.webflow.com/6310ad0e6a18aa1620da6ae8/6330e04f42bc6a7ba03b4725_snicon.png" | ||
statusInformers: | ||
- slackernews/deployment/slackernews | ||
- slackernews/deployment/slackernews-nginx | ||
- '{{repl if ConfigOptionEquals "deploy_postgres" "1"}}slackernews/statefulset/postgres{{repl end}}' | ||
additionalNamespaces: | ||
- slackernews | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I left this config as is from Chuck's version (rather than removing a lot of the unused options). I wasn't too keen to try to back out all the interwoven values that pull from this in the chart. Plus, seems like a nice example of how you can use this config resource.
Instead, I tell people that they'll be ignoring most of these for the purpose of the tutorial.