-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
salt, build: automate catalogd install
- Loading branch information
Showing
11 changed files
with
926 additions
and
0 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
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
160 changes: 160 additions & 0 deletions
160
salt/metalk8s/addons/olm/catalogd/deployed/catalogd.sls
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,160 @@ | ||
#!jinja | metalk8s_kubernetes | ||
{%- from "metalk8s/repo/macro.sls" import build_image_name with context %} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: catalogd | ||
app.kubernetes.io/part-of: olm | ||
name: catalogd-service | ||
namespace: olmv1-system | ||
spec: | ||
ports: | ||
- name: https | ||
port: 443 | ||
protocol: TCP | ||
targetPort: 8443 | ||
- name: webhook | ||
port: 9443 | ||
protocol: TCP | ||
targetPort: 9443 | ||
- name: metrics | ||
port: 7443 | ||
protocol: TCP | ||
targetPort: 7443 | ||
selector: | ||
control-plane: catalogd-controller-manager | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
kubectl.kubernetes.io/default-logs-container: manager | ||
labels: | ||
control-plane: catalogd-controller-manager | ||
name: catalogd-controller-manager | ||
namespace: olmv1-system | ||
spec: | ||
minReadySeconds: 5 | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
control-plane: catalogd-controller-manager | ||
template: | ||
metadata: | ||
annotations: | ||
kubectl.kubernetes.io/default-container: manager | ||
labels: | ||
control-plane: catalogd-controller-manager | ||
spec: | ||
nodeSelector: | ||
kubernetes.io/os: linux | ||
node-role.kubernetes.io/infra: "" | ||
tolerations: | ||
- effect: NoSchedule | ||
key: node-role.kubernetes.io/bootstrap | ||
operator: Exists | ||
- effect: NoSchedule | ||
key: node-role.kubernetes.io/infra | ||
operator: Exists | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: | ||
- amd64 | ||
- arm64 | ||
- ppc64le | ||
- s390x | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: | ||
- linux | ||
containers: | ||
- args: | ||
- --secure-listen-address=0.0.0.0:7443 | ||
- --http2-disable | ||
- --upstream=http://127.0.0.1:8080/ | ||
- --logtostderr=true | ||
image: {{ build_image_name("kube-rbac-proxy") }} | ||
name: kube-rbac-proxy | ||
ports: | ||
- containerPort: 7443 | ||
name: https | ||
protocol: TCP | ||
resources: | ||
requests: | ||
cpu: 5m | ||
memory: 64Mi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
terminationMessagePolicy: FallbackToLogsOnError | ||
- args: | ||
- --leader-elect | ||
- --metrics-bind-address=127.0.0.1:8080 | ||
- --external-address=catalogd-service.olmv1-system.svc | ||
- --tls-cert=/var/certs/tls.crt | ||
- --tls-key=/var/certs/tls.key | ||
- --ca-certs-dir=/var/ca-certs | ||
command: | ||
- ./manager | ||
image: {{ build_image_name("catalogd") }} | ||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: 8081 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
name: manager | ||
readinessProbe: | ||
httpGet: | ||
path: /readyz | ||
port: 8081 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 200Mi | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
terminationMessagePolicy: FallbackToLogsOnError | ||
volumeMounts: | ||
- mountPath: /var/cache/ | ||
name: cache | ||
- mountPath: /var/certs | ||
name: catalogserver-certs | ||
- mountPath: /var/ca-certs/ | ||
name: olmv1-certificate | ||
readOnly: true | ||
securityContext: | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
serviceAccountName: catalogd-controller-manager | ||
terminationGracePeriodSeconds: 10 | ||
volumes: | ||
- emptyDir: {} | ||
name: cache | ||
- name: catalogserver-certs | ||
secret: | ||
secretName: catalogd-service-cert-v1.0.0 | ||
- name: olmv1-certificate | ||
secret: | ||
items: | ||
- key: ca.crt | ||
path: olm-ca.crt | ||
optional: false | ||
secretName: catalogd-service-cert-v1.0.0 |
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,54 @@ | ||
#!jinja | metalk8s_kubernetes | ||
|
||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: olmv1-ca | ||
namespace: metalk8s-certs | ||
spec: | ||
commonName: olmv1-ca | ||
isCA: true | ||
issuerRef: | ||
group: cert-manager.io | ||
kind: Issuer | ||
name: self-sign-issuer | ||
privateKey: | ||
algorithm: ECDSA | ||
size: 256 | ||
secretName: olmv1-ca | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: catalogd-catalogserver-cert | ||
namespace: olmv1-system | ||
spec: | ||
dnsNames: | ||
- localhost | ||
- catalogd-catalogserver.olmv1-system.svc | ||
- catalogd-catalogserver.olmv1-system.svc.cluster.local | ||
issuerRef: | ||
group: cert-manager.io | ||
kind: ClusterIssuer | ||
name: olmv1-ca | ||
privateKey: | ||
algorithm: ECDSA | ||
size: 256 | ||
secretName: catalogd-catalogserver-cert | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: olmv1-ca | ||
spec: | ||
ca: | ||
secretName: olmv1-ca | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: self-sign-issuer | ||
namespace: metalk8s-certs | ||
spec: | ||
selfSigned: {} |
Oops, something went wrong.