Skip to content

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
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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 Aug 8, 2025
5f4c0e3
steps for getting smaple chart
paigecalvert Aug 11, 2025
2c43af7
edits
paigecalvert Aug 11, 2025
d766666
edits
paigecalvert Aug 11, 2025
7bb605b
edits
paigecalvert Aug 11, 2025
5bbf003
edits and update tar
paigecalvert Aug 11, 2025
fcdacc9
rm slackernews archive to publish them in different pr
paigecalvert Aug 11, 2025
9b13b06
edits
paigecalvert Aug 11, 2025
0645577
edits
paigecalvert Aug 12, 2025
a0f35db
edits
paigecalvert Aug 12, 2025
f8ab6aa
edits
paigecalvert Aug 12, 2025
6caaae7
adding screenshots
paigecalvert Aug 12, 2025
8c72e01
adding screenshots
paigecalvert Aug 12, 2025
66f5650
adding screenshots
paigecalvert Aug 12, 2025
18f550e
adding screenshots
paigecalvert Aug 12, 2025
4d6125e
edits
paigecalvert Aug 12, 2025
3a59d01
fix untar command
paigecalvert Aug 18, 2025
a770e3c
edits
paigecalvert Aug 19, 2025
26a0a9d
update kots and k8s app yaml
paigecalvert Aug 20, 2025
091ba16
edit ingress and port info
paigecalvert Aug 20, 2025
45fa69a
edit config page instructions
paigecalvert Aug 20, 2025
ed3f90e
editing release yaml
paigecalvert Aug 20, 2025
ffcaa36
various edits
paigecalvert Aug 20, 2025
7a3ea51
edit related topics links
paigecalvert Aug 20, 2025
3b1a116
edit prerequisites
paigecalvert Aug 20, 2025
625ed6f
edits
paigecalvert Aug 20, 2025
cbb7b33
add screenshot and fix typos
paigecalvert Aug 21, 2025
d70348f
quick start edits
paigecalvert Aug 22, 2025
28954d9
edit
paigecalvert Aug 22, 2025
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
137 changes: 137 additions & 0 deletions docs/partials/getting-started/_slackernews-chart.mdx
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
```
153 changes: 153 additions & 0 deletions docs/partials/getting-started/_slackernews-config.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
```yaml
Copy link
Contributor Author

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.

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"}}
```
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
```
30 changes: 30 additions & 0 deletions docs/partials/getting-started/_slackernews-k8s-app.mdx
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" }}'
```
17 changes: 17 additions & 0 deletions docs/partials/getting-started/_slackernews-repl-app.mdx
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
```
Loading