Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 48 additions & 0 deletions bundle/manifests/rhtpa-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,54 @@ spec:
spec:
clusterPermissions:
- rules:
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- get
- list
- watch
- delete
- patch
- update
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- get
- list
- watch
- delete
- patch
- update
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterroles
- clusterrolebindings
verbs:
- create
- get
- list
- watch
- delete
- patch
- update
- apiGroups:
- config.openshift.io
resources:
- ingresses
- clusterversions
verbs:
- get
- list
- watch
- patch
- update
- apiGroups:
- networking.k8s.io
resources:
Expand Down
4 changes: 4 additions & 0 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ resources:
- rolebinding_job.yaml
- role_cluster_ingress.yaml
- role_cluster_ingress_binding.yaml
- role_cluster_tlsconfigurator.yaml
- role_binding_tlsconfigurator.yaml
- role_cluster_rbac_manager.yaml
- role_cluster_rbac_manager_binding.yaml
# The following RBAC configurations are used to protect
# the metrics endpoint with authn/authz. These configurations
# ensure that only authorized users and service accounts
Expand Down
12 changes: 12 additions & 0 deletions config/rbac/role_binding_tlsconfigurator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tls-configurator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tls-configurator
subjects:
- kind: ServiceAccount
name: tls-configurator
namespace: openshift-ingress-operator
17 changes: 17 additions & 0 deletions config/rbac/role_cluster_rbac_manager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: rhtpa-rbac-manager
rules:
- apiGroups: [""]
resources: ["serviceaccounts"]
verbs: ["create", "get", "list", "watch", "delete", "patch", "update"]
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["create", "get", "list", "watch", "delete", "patch", "update"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["clusterroles", "clusterrolebindings"]
verbs: ["create", "get", "list", "watch", "delete", "patch", "update"]
- apiGroups: ["config.openshift.io"]
resources: ["ingresses", "clusterversions"]
verbs: ["get", "list", "watch", "patch", "update"]
12 changes: 12 additions & 0 deletions config/rbac/role_cluster_rbac_manager_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rhtpa-rbac-manager
subjects:
- kind: ServiceAccount
name: rhtpa-operator-controller-manager
namespace: placeholder
Comment thread
desmax74 marked this conversation as resolved.
roleRef:
kind: ClusterRole
name: rhtpa-rbac-manager
apiGroup: rbac.authorization.k8s.io
11 changes: 11 additions & 0 deletions config/rbac/role_cluster_tlsconfigurator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tls-configurator
rules:
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["create", "get", "list", "watch", "delete", "patch"]
- apiGroups: ["config.openshift.io"]
resources: ["ingresses", "clusterversions"]
verbs: ["get", "list", "watch", "patch", "update"]
9 changes: 9 additions & 0 deletions config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ metadata:
app.kubernetes.io/managed-by: kustomize
name: controller-manager
namespace: system
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: rhtpa-operator
app.kubernetes.io/managed-by: kustomize
name: tls-configurator
namespace: openshift-ingress-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.modules.tlsConfigurator.enabled }}

apiVersion: v1
kind: ServiceAccount
metadata:
name: tls-configurator
namespace: openshift-ingress-operator
labels:
app.kubernetes.io/name: tls-configurator
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
argocd.argoproj.io/sync-wave: "1"
helm.sh/hook-weight: "10"
helm.sh/hook: "pre-install,pre-upgrade"
helm.sh/hook-delete-policy: before-hook-creation
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if .Values.modules.tlsConfigurator.enabled }}

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tls-configurator
labels:
app.kubernetes.io/name: tls-configurator
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
argocd.argoproj.io/sync-wave: "2"
helm.sh/hook-weight: "15"
helm.sh/hook: "pre-install,pre-upgrade"
helm.sh/hook-delete-policy: before-hook-creation
rules:
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["create", "get", "list", "watch", "delete", "patch"]
- apiGroups: ["config.openshift.io"]
resources: ["ingresses", "clusterversions"]
verbs: ["get", "list", "watch", "patch", "update"]
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.modules.tlsConfigurator.enabled }}

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tls-configurator
labels:
app.kubernetes.io/name: tls-configurator
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
argocd.argoproj.io/sync-wave: "2"
helm.sh/hook-weight: "18"
helm.sh/hook: "pre-install,pre-upgrade"
helm.sh/hook-delete-policy: before-hook-creation
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: tls-configurator
subjects:
- kind: ServiceAccount
name: tls-configurator
namespace: openshift-ingress-operator
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{- if .Values.modules.tlsConfigurator.enabled }}

kind: Job
apiVersion: batch/v1
metadata:
name: tls-configurator
namespace: openshift-ingress-operator
labels:
app.kubernetes.io/name: tls-configurator
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
argocd.argoproj.io/sync-wave: "3"
helm.sh/hook-weight: "20"
helm.sh/hook: "pre-install,pre-upgrade"
helm.sh/hook-delete-policy: before-hook-creation

spec:
backoffLimit: 10
completions: 1
parallelism: 1
ttlSecondsAfterFinished: 600
Comment thread
sourcery-ai[bot] marked this conversation as resolved.

template:
metadata:
labels:
app.kubernetes.io/name: tls-configurator
spec:
serviceAccountName: tls-configurator
containers:
- name: tls-configurator
image: {{ .Values.modules.tlsConfigurator.image.fullName }}
args:
- "--action=update"
- "--type=Custom"
- "--min-tls-version=VersionTLS13"
- "--ciphers=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384"
restartPolicy: OnFailure
{{- end }}
14 changes: 14 additions & 0 deletions helm-charts/redhat-trusted-profile-analyzer/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,20 @@
}
}
]
},
"tlsConfigurator": {
"description": "TLS Configuragtor for Openshift\n",
"allOf": [
{
"$ref": "#/definitions/Feature"
},
{
"$ref": "#/definitions/Image"
},
{
"$ref": "#/definitions/Application"
}
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ properties:
- $ref: "#/definitions/Image"
- $ref: "#/definitions/Application"

tlsConfigurator:
description: |
TLS Configurator for Openshift
allOf:
- $ref: "#/definitions/Feature"
- $ref: "#/definitions/Image"
- $ref: "#/definitions/Application"

createImporters:
description: |
Job to create a set of pre-defined importers
Expand Down
7 changes: 7 additions & 0 deletions helm-charts/redhat-trusted-profile-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,10 @@ modules:
source: quay.io
namespace: redhat-user-workloads
disabled: true

tlsConfigurator:
enabled: false
name: tls-configurator
image:
fullName: quay.io/mdessi/tls-configurator:latest
pullPolicy: IfNotPresent