-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
353 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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,28 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nginx-content | ||
data: | ||
index.html: | | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | ||
<title>Demo Application</title> | ||
<link href="styles.css" rel="stylesheet" type="text/css"> | ||
</head> | ||
<body> | ||
This is an example KOTS application. | ||
<p>This is text from a user config value: '{{repl ConfigOption "example_default_value"}}' </p> | ||
</br> | ||
This is a hidden value: '{{repl ConfigOption "hidden_text"}}' | ||
</body> | ||
</html> | ||
styles.css: | | ||
body { | ||
text-align: center; | ||
background-color: rgb(224,224,224); | ||
font-family: Verdana, Arial, Helvetica, sans-serif; | ||
font-size: 100%; | ||
} |
This file contains 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,35 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx | ||
labels: | ||
app: nginx | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
annotations: | ||
backup.velero.io/backup-volumes: nginx-content | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
volumeMounts: | ||
- name: nginx-content | ||
mountPath: /usr/share/nginx/html/ | ||
resources: | ||
limits: | ||
memory: '256Mi' | ||
cpu: '500m' | ||
requests: | ||
memory: '32Mi' | ||
cpu: '100m' | ||
volumes: | ||
- name: nginx-content | ||
configMap: | ||
name: nginx-content |
This file contains 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 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx | ||
labels: | ||
app: nginx | ||
annotations: | ||
kots.io/when: '{{repl not IsKurl }}' | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 80 | ||
selector: | ||
app: nginx | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx | ||
labels: | ||
app: nginx | ||
annotations: | ||
kots.io/when: '{{repl IsKurl }}' | ||
spec: | ||
type: NodePort | ||
ports: | ||
- port: 80 | ||
nodePort: 8888 | ||
selector: | ||
app: nginx |
This file contains 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,10 @@ | ||
apiVersion: app.k8s.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: "nginx" | ||
spec: | ||
descriptor: | ||
links: | ||
- description: Open App | ||
# needs to match applicationUrl in kots-app.yaml | ||
url: "http://nginx" |
This file contains 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,15 @@ | ||
--- | ||
apiVersion: kots.io/v1beta1 | ||
kind: Application | ||
metadata: | ||
name: nginx | ||
spec: | ||
title: App Name | ||
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/kubernetes/icon/color/kubernetes-icon-color.png | ||
statusInformers: | ||
- deployment/nginx | ||
ports: | ||
- serviceName: "nginx" | ||
servicePort: 80 | ||
localPort: 8888 | ||
applicationUrl: "http://nginx" |
This file contains 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,44 @@ | ||
--- | ||
apiVersion: kots.io/v1beta1 | ||
kind: Config | ||
metadata: | ||
name: config-sample | ||
spec: | ||
groups: | ||
- name: example_settings | ||
title: My Example Config | ||
description: Configuration to serve as an example for creating your own. See [https://kots.io/reference/v1beta1/config/](https://kots.io/reference/v1beta1/config/) for configuration docs. In this case, we provide example fields for configuring an Nginx welcome page. | ||
items: | ||
- name: show_text_inputs | ||
title: Customize Text Inputs | ||
help_text: "Show custom user text inputs" | ||
type: bool | ||
default: "0" | ||
recommended: true | ||
- name: example_default_value | ||
title: Text Example (with default value) | ||
type: text | ||
value: "" | ||
default: please change this value | ||
when: repl{{ ConfigOptionEquals "show_text_inputs" "1" }} | ||
- name: api_token | ||
title: API token | ||
type: password | ||
props: | ||
rows: 5 | ||
when: repl{{ ConfigOptionEquals "show_text_inputs" "1" }} | ||
validation: | ||
regex: | ||
pattern: ^(?:[\w@#$%^&+=!*()_\-{}[\]:;"'<>,.?\/|]){8,16}$ | ||
message: The password must be between 8 and 16 characters long and can contain a combination of uppercase letters, lowercase letters, digits, and special characters. | ||
- name: readonly_text_left | ||
title: Readonly Text | ||
type: text | ||
value: "{{repl RandomString 10}}" | ||
readonly: true | ||
when: repl{{ ConfigOptionEquals "show_text_inputs" "1" }} | ||
- name: hidden_text | ||
title: Secret Key | ||
type: password | ||
hidden: true | ||
value: "{{repl RandomString 40}}" |
This file contains 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,90 @@ | ||
apiVersion: kots.io/v1beta1 | ||
kind: LintConfig | ||
metadata: | ||
name: default-lint-config | ||
spec: | ||
rules: | ||
- name: missing-kind-field | ||
level: "error" | ||
- name: missing-api-version-field | ||
level: "error" | ||
- name: preflight-spec | ||
level: "warn" | ||
- name: config-spec | ||
level: "warn" | ||
- name: troubleshoot-spec | ||
level: "warn" | ||
- name: application-spec | ||
level: "warn" | ||
- name: application-icon | ||
level: "warn" | ||
- name: application-statusInformers | ||
level: "warn" | ||
- name: invalid-target-kots-version | ||
level: "error" | ||
- name: invalid-min-kots-version | ||
level: "error" | ||
- name: invalid-kubernetes-installer | ||
level: "error" | ||
- name: deprecated-kubernetes-installer-version | ||
level: "warn" | ||
- name: duplicate-kots-kind | ||
level: "error" | ||
- name: invalid-helm-release-name | ||
level: "error" | ||
- name: duplicate-helm-release-name | ||
level: "error" | ||
- name: replicas-1 | ||
level: "info" | ||
- name: privileged | ||
level: "info" | ||
- name: allow-privilege-escalation | ||
level: "info" | ||
- name: container-image-latest-tag | ||
level: "info" | ||
- name: container-image-local-image-name | ||
level: "error" | ||
- name: container-resources | ||
level: "info" | ||
- name: container-resource-limits | ||
level: "info" | ||
- name: container-resource-requests | ||
level: "info" | ||
- name: resource-limits-cpu | ||
level: "info" | ||
- name: resource-limits-memory | ||
level: "info" | ||
- name: resource-requests-cpu | ||
level: "info" | ||
- name: resource-requests-memory | ||
level: "info" | ||
- name: volumes-host-paths | ||
level: "info" | ||
- name: volume-docker-sock | ||
level: "info" | ||
- name: hardcoded-namespace | ||
level: "info" | ||
- name: may-contain-secrets | ||
level: "info" | ||
- name: config-option-invalid-type | ||
level: "error" | ||
- name: repeat-option-missing-template | ||
level: "error" | ||
- name: repeat-option-missing-valuesByGroup | ||
level: "error" | ||
- name: repeat-option-malformed-yamlpath | ||
level: "error" | ||
- name: config-option-password-type | ||
level: "warn" | ||
- name: config-option-not-found | ||
level: "warn" | ||
- name: config-option-is-circular | ||
level: "error" | ||
- name: config-option-not-repeatable | ||
level: "error" | ||
- name: config-option-when-is-invalid | ||
level: "error" | ||
- name: config-option-invalid-regex-validator | ||
level: "error" | ||
- name: config-option-regex-validator-invalid-type | ||
level: "error" |
Oops, something went wrong.