-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from reactiveops/rs/prerelease
Prerelease Cleanup
- Loading branch information
Showing
30 changed files
with
435 additions
and
188 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
FROM golang:1.11.4 AS build-env | ||
FROM golang:1.12.4 AS build-env | ||
WORKDIR /go/src/github.com/reactiveops/fairwinds/ | ||
|
||
COPY . . | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o fairwinds *.go | ||
RUN go get -u github.com/gobuffalo/packr/v2/packr2 | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 packr2 build -a -o fairwinds *.go | ||
|
||
FROM alpine:3.8 | ||
FROM alpine:3.9 | ||
WORKDIR /usr/local/bin | ||
RUN apk --no-cache add ca-certificates | ||
|
||
USER nobody | ||
RUN addgroup -S fairwinds && adduser -S -G fairwinds fairwinds | ||
USER fairwinds | ||
COPY --from=build-env /go/src/github.com/reactiveops/fairwinds/fairwinds . | ||
|
||
WORKDIR /opt/app | ||
|
||
COPY --from=build-env /go/src/github.com/reactiveops/fairwinds/pkg/dashboard/templates/dashboard.gohtml ./pkg/dashboard/templates/dashboard.gohtml | ||
COPY --from=build-env /go/src/github.com/reactiveops/fairwinds/public ./public | ||
COPY --from=build-env /go/src/github.com/reactiveops/fairwinds/config.yaml ./config.yaml | ||
|
||
ENTRYPOINT ["fairwinds"] | ||
CMD ["fairwinds"] |
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,3 @@ | ||
helm-to-k8s: | ||
helm template deploy/helm/fairwinds/ --name fairwinds --namespace fairwinds --set templateOnly=true > deploy/dashboard.yaml | ||
helm template deploy/helm/fairwinds/ --name fairwinds --namespace fairwinds --set templateOnly=true --set webhook.enable=true --set dashboard.enable=false > deploy/webhook.yaml |
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,193 @@ | ||
--- | ||
# Source: fairwinds/templates/namespace.yaml | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: fairwinds | ||
--- | ||
# Source: fairwinds/templates/configmap.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: fairwinds | ||
namespace: fairwinds | ||
labels: | ||
app: fairwinds | ||
data: | ||
config.yaml: | | ||
resources: | ||
cpuRequestsMissing: error | ||
cpuLimitsMissing: error | ||
memoryRequestsMissing: error | ||
memoryLimitsMissing: error | ||
images: | ||
tagNotSpecified: error | ||
healthChecks: | ||
readinessProbeMissing: warning | ||
livenessProbeMissing: warning | ||
networking: | ||
hostNetworkSet: warning | ||
hostPortSet: warning | ||
security: | ||
hostIPCSet: error | ||
hostPIDSet: error | ||
notReadOnlyRootFileSystem: warning | ||
privilegeEscalationAllowed: error | ||
runAsRootAllowed: warning | ||
runAsPrivileged: error | ||
capabilities: | ||
error: | ||
ifAnyAdded: | ||
- SYS_ADMIN | ||
- NET_ADMIN | ||
- ALL | ||
warning: | ||
ifAnyAddedBeyond: | ||
- CHOWN | ||
- DAC_OVERRIDE | ||
- FSETID | ||
- FOWNER | ||
- MKNOD | ||
- NET_RAW | ||
- SETGID | ||
- SETUID | ||
- SETFCAP | ||
- SETPCAP | ||
- NET_BIND_SERVICE | ||
- SYS_CHROOT | ||
- KILL | ||
- AUDIT_WRITE | ||
--- | ||
# Source: fairwinds/templates/serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: fairwinds | ||
namespace: fairwinds | ||
labels: | ||
app: fairwinds | ||
|
||
--- | ||
# Source: fairwinds/templates/clusterrole.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
name: fairwinds | ||
labels: | ||
app: fairwinds | ||
rules: | ||
- apiGroups: | ||
- '' | ||
- 'apps' | ||
- 'admissionregistration.k8s.io' | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
--- | ||
# Source: fairwinds/templates/clusterrolebinding.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: fairwinds | ||
labels: | ||
app: fairwinds | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: fairwinds | ||
subjects: | ||
- kind: ServiceAccount | ||
name: fairwinds | ||
namespace: fairwinds | ||
--- | ||
# Source: fairwinds/templates/dashboard.service.yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: fairwinds-dashboard | ||
namespace: fairwinds | ||
labels: | ||
app: fairwinds | ||
spec: | ||
ports: | ||
- name: dashboard | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 8080 | ||
selector: | ||
app: fairwinds | ||
component: dashboard | ||
type: ClusterIP | ||
--- | ||
# Source: fairwinds/templates/dashboard.deployment.yaml | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
checksum/config: '5702aca235561630172c22b6b900f5cebd4e82fae60389df18a3537ff82e2f09' | ||
name: fairwinds-dashboard | ||
namespace: fairwinds | ||
labels: | ||
app: fairwinds | ||
component: dashboard | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: fairwinds | ||
component: dashboard | ||
template: | ||
metadata: | ||
labels: | ||
app: fairwinds | ||
component: dashboard | ||
spec: | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: fairwinds | ||
containers: | ||
- command: | ||
- fairwinds | ||
- --dashboard | ||
image: 'quay.io/reactiveops/fairwinds:master' | ||
imagePullPolicy: 'Always' | ||
name: dashboard | ||
ports: | ||
- containerPort: 8080 | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: 8080 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 5 | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: 8080 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 128Mi | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
volumeMounts: | ||
- name: config | ||
mountPath: /opt/app/config.yaml | ||
subPath: config.yaml | ||
readOnly: true | ||
serviceAccountName: fairwinds | ||
--- | ||
# Source: fairwinds/templates/secret.yaml | ||
|
||
--- | ||
# Source: fairwinds/templates/webhook.deployment.yaml | ||
|
||
--- | ||
# Source: fairwinds/templates/webhook.service.yaml | ||
|
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,19 @@ | ||
{{- if .Values.webhook.enable -}} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "fairwinds.fullname" . }}-dashboard | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "fairwinds.labels" . | nindent 4 }} | ||
spec: | ||
ports: | ||
- name: dashboard | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 8080 | ||
selector: | ||
{{- include "fairwinds.selectors" . | nindent 4 }} | ||
component: dashboard | ||
type: ClusterIP | ||
{{- end -}} |
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
Oops, something went wrong.