Skip to content

Commit f288aed

Browse files
committed
test/oauth-server-creation-minimal: adds a test show which input resources are required to run the operator and the controller that creates oauth-server deployment
1 parent 11e57aa commit f288aed

File tree

19 files changed

+7620
-0
lines changed

19 files changed

+7620
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: operator.openshift.io/v1
2+
kind: Authentication
3+
metadata:
4+
name: cluster
5+
status:
6+
conditions:
7+
- lastTransitionTime: "2025-08-07T22:38:20Z"
8+
message: no oauth-openshift.openshift-authentication pods available on any node.
9+
reason: NoPod
10+
status: "False"
11+
type: OAuthServerDeploymentAvailable
12+
- lastTransitionTime: "2025-08-01T18:45:36Z"
13+
reason: AsExpected
14+
status: "False"
15+
type: OAuthServerDeploymentDegraded
16+
- lastTransitionTime: "2025-08-07T22:38:20Z"
17+
message: 'deployment/oauth-openshift.openshift-authentication: 0/1 pods have been
18+
updated to the latest generation and 0/1 pods are available'
19+
reason: PodsUpdating
20+
status: "True"
21+
type: OAuthServerDeploymentProgressing
22+
- lastTransitionTime: "2025-08-01T18:45:36Z"
23+
status: "False"
24+
type: OAuthServerWorkloadDegraded
25+
generations:
26+
- group: apps
27+
lastGeneration: 0
28+
name: oauth-openshift
29+
namespace: openshift-authentication
30+
resource: deployments
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
action: ApplyStatus
2+
controllerInstanceName: TODO-deploymentController
3+
fieldManager: OAuthServer-Workload
4+
generateName: ""
5+
mame: cluster
6+
resourceType:
7+
Group: operator.openshift.io
8+
Resource: authentications
9+
Version: v1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fieldManager: OAuthServer-Workload
2+
force: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: v1
2+
count: 1
3+
eventTime: null
4+
firstTimestamp: "2025-08-07T22:38:20Z"
5+
involvedObject:
6+
kind: Deployment
7+
name: authentication-operator
8+
namespace: openshift-authentication-operator
9+
kind: Event
10+
lastTimestamp: "2025-08-07T22:38:20Z"
11+
message: Created Deployment.apps/oauth-openshift -n openshift-authentication because
12+
it was missing
13+
metadata:
14+
creationTimestamp: null
15+
name: authentication-operator.18599d2230299800.64fe3b99
16+
namespace: openshift-authentication-operator
17+
reason: DeploymentCreated
18+
reportingComponent: ""
19+
reportingInstance: ""
20+
source:
21+
component: cluster-authentication-operator-run-once-sync-context
22+
type: Normal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
action: Create
2+
controllerInstanceName: ""
3+
generateName: ""
4+
mame: authentication-operator.18599d2230299800.64fe3b99
5+
namespace: openshift-authentication-operator
6+
resourceType:
7+
Group: ""
8+
Resource: events
9+
Version: v1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
annotations:
5+
operator.openshift.io/rvs-hash: f4V-TOKKLhC7zxXahsybviIQ6XFZf_Ua2SFe2jckw9gL4UuCiEXYmFPtjUvFGC13xB72tEYqR0N1somiZq0-JQ
6+
operator.openshift.io/spec-hash: cb88a721f1243c54f093947afdb5770c7dfca953b2cafda9e074e6268586a5ce
7+
creationTimestamp: null
8+
labels:
9+
app: oauth-openshift
10+
name: oauth-openshift
11+
namespace: openshift-authentication
12+
spec:
13+
replicas: 3
14+
selector:
15+
matchLabels:
16+
app: oauth-openshift
17+
strategy:
18+
rollingUpdate:
19+
maxSurge: 0
20+
maxUnavailable: 1
21+
type: RollingUpdate
22+
template:
23+
metadata:
24+
annotations:
25+
openshift.io/required-scc: privileged
26+
operator.openshift.io/rvs-hash: f4V-TOKKLhC7zxXahsybviIQ6XFZf_Ua2SFe2jckw9gL4UuCiEXYmFPtjUvFGC13xB72tEYqR0N1somiZq0-JQ
27+
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
28+
creationTimestamp: null
29+
labels:
30+
app: oauth-openshift
31+
oauth-openshift-anti-affinity: "true"
32+
name: oauth-openshift
33+
namespace: openshift-authentication
34+
spec:
35+
affinity:
36+
podAntiAffinity:
37+
requiredDuringSchedulingIgnoredDuringExecution:
38+
- labelSelector:
39+
matchLabels:
40+
app: oauth-openshift
41+
oauth-openshift-anti-affinity: "true"
42+
topologyKey: kubernetes.io/hostname
43+
containers:
44+
- args:
45+
- |
46+
if [ -s /var/config/system/configmaps/v4-0-config-system-trusted-ca-bundle/ca-bundle.crt ]; then
47+
echo "Copying system trust bundle"
48+
cp -f /var/config/system/configmaps/v4-0-config-system-trusted-ca-bundle/ca-bundle.crt /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
49+
fi
50+
exec oauth-server osinserver \
51+
--config=/var/config/system/configmaps/v4-0-config-system-cliconfig/v4-0-config-system-cliconfig \
52+
--v=2 \
53+
--audit-log-format=json \
54+
--audit-log-maxbackup=10 \
55+
--audit-log-maxsize=100 \
56+
--audit-log-path=/var/log/oauth-server/audit.log \
57+
--audit-policy-file=/var/run/configmaps/audit/audit.yaml
58+
command:
59+
- /bin/bash
60+
- -ec
61+
lifecycle:
62+
preStop:
63+
exec:
64+
command:
65+
- sleep
66+
- "25"
67+
livenessProbe:
68+
failureThreshold: 3
69+
httpGet:
70+
path: /healthz
71+
port: 6443
72+
scheme: HTTPS
73+
initialDelaySeconds: 30
74+
periodSeconds: 10
75+
successThreshold: 1
76+
timeoutSeconds: 1
77+
name: oauth-openshift
78+
ports:
79+
- containerPort: 6443
80+
name: https
81+
protocol: TCP
82+
readinessProbe:
83+
failureThreshold: 3
84+
httpGet:
85+
path: /healthz
86+
port: 6443
87+
scheme: HTTPS
88+
periodSeconds: 10
89+
successThreshold: 1
90+
timeoutSeconds: 1
91+
resources:
92+
requests:
93+
cpu: 10m
94+
memory: 50Mi
95+
securityContext:
96+
privileged: true
97+
readOnlyRootFilesystem: false
98+
runAsUser: 0
99+
terminationMessagePolicy: FallbackToLogsOnError
100+
volumeMounts:
101+
- mountPath: /var/run/configmaps/audit
102+
name: audit-policies
103+
- mountPath: /var/log/oauth-server
104+
name: audit-dir
105+
- mountPath: /var/config/system/secrets/v4-0-config-system-session
106+
name: v4-0-config-system-session
107+
readOnly: true
108+
- mountPath: /var/config/system/configmaps/v4-0-config-system-cliconfig
109+
name: v4-0-config-system-cliconfig
110+
readOnly: true
111+
- mountPath: /var/config/system/secrets/v4-0-config-system-serving-cert
112+
name: v4-0-config-system-serving-cert
113+
readOnly: true
114+
- mountPath: /var/config/system/configmaps/v4-0-config-system-service-ca
115+
name: v4-0-config-system-service-ca
116+
readOnly: true
117+
- mountPath: /var/config/system/secrets/v4-0-config-system-router-certs
118+
name: v4-0-config-system-router-certs
119+
readOnly: true
120+
- mountPath: /var/config/system/secrets/v4-0-config-system-ocp-branding-template
121+
name: v4-0-config-system-ocp-branding-template
122+
readOnly: true
123+
- mountPath: /var/config/user/template/secret/v4-0-config-user-template-login
124+
name: v4-0-config-user-template-login
125+
readOnly: true
126+
- mountPath: /var/config/user/template/secret/v4-0-config-user-template-provider-selection
127+
name: v4-0-config-user-template-provider-selection
128+
readOnly: true
129+
- mountPath: /var/config/user/template/secret/v4-0-config-user-template-error
130+
name: v4-0-config-user-template-error
131+
readOnly: true
132+
- mountPath: /var/config/system/configmaps/v4-0-config-system-trusted-ca-bundle
133+
name: v4-0-config-system-trusted-ca-bundle
134+
readOnly: true
135+
nodeSelector:
136+
node-role.kubernetes.io/master: ""
137+
priorityClassName: system-cluster-critical
138+
serviceAccountName: oauth-openshift
139+
terminationGracePeriodSeconds: 40
140+
tolerations:
141+
- effect: NoSchedule
142+
key: node-role.kubernetes.io/master
143+
operator: Exists
144+
- effect: NoExecute
145+
key: node.kubernetes.io/unreachable
146+
operator: Exists
147+
tolerationSeconds: 120
148+
- effect: NoExecute
149+
key: node.kubernetes.io/not-ready
150+
operator: Exists
151+
tolerationSeconds: 120
152+
volumes:
153+
- configMap:
154+
name: audit
155+
name: audit-policies
156+
- hostPath:
157+
path: /var/log/oauth-server
158+
name: audit-dir
159+
- name: v4-0-config-system-session
160+
secret:
161+
secretName: v4-0-config-system-session
162+
- configMap:
163+
name: v4-0-config-system-cliconfig
164+
name: v4-0-config-system-cliconfig
165+
- name: v4-0-config-system-serving-cert
166+
secret:
167+
secretName: v4-0-config-system-serving-cert
168+
- configMap:
169+
name: v4-0-config-system-service-ca
170+
name: v4-0-config-system-service-ca
171+
- name: v4-0-config-system-router-certs
172+
secret:
173+
secretName: v4-0-config-system-router-certs
174+
- name: v4-0-config-system-ocp-branding-template
175+
secret:
176+
secretName: v4-0-config-system-ocp-branding-template
177+
- name: v4-0-config-user-template-login
178+
secret:
179+
optional: true
180+
secretName: v4-0-config-user-template-login
181+
- name: v4-0-config-user-template-provider-selection
182+
secret:
183+
optional: true
184+
secretName: v4-0-config-user-template-provider-selection
185+
- name: v4-0-config-user-template-error
186+
secret:
187+
optional: true
188+
secretName: v4-0-config-user-template-error
189+
- configMap:
190+
name: v4-0-config-system-trusted-ca-bundle
191+
optional: true
192+
name: v4-0-config-system-trusted-ca-bundle
193+
status: {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
action: Create
2+
controllerInstanceName: TODO-deploymentController
3+
generateName: ""
4+
mame: oauth-openshift
5+
namespace: openshift-authentication
6+
resourceType:
7+
Group: apps
8+
Resource: deployments
9+
Version: v1
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
controllerResults:
2+
- controllerName: APIServerStaticResources-StaticResources
3+
status: Skipped
4+
- controllerName: NamespaceFinalizerController_openshift-oauth-apiserver
5+
status: Skipped
6+
- controllerName: OAuthAPIServerController-WorkloadWorkloadController
7+
status: Skipped
8+
- controllerName: RevisionController
9+
status: Skipped
10+
- controllerName: SecretRevisionPruneController
11+
status: Skipped
12+
- controllerName: TODO-authRouteCheckController
13+
status: Skipped
14+
- controllerName: TODO-authServiceCheckController
15+
status: Skipped
16+
- controllerName: TODO-authServiceEndpointCheckController
17+
status: Skipped
18+
- controllerName: TODO-authenticatorCertRequester
19+
status: Skipped
20+
- controllerName: TODO-configObserver
21+
status: Skipped
22+
- controllerName: TODO-configOverridesController
23+
status: Skipped
24+
- controllerName: TODO-customRouteController
25+
status: Skipped
26+
- controllerName: TODO-deploymentController
27+
status: Succeeded
28+
- controllerName: TODO-ingressStateController
29+
status: Skipped
30+
- controllerName: TODO-logLevelController
31+
status: Skipped
32+
- controllerName: TODO-managementStateController
33+
status: Skipped
34+
- controllerName: TODO-metadataController
35+
status: Skipped
36+
- controllerName: TODO-oauthClientsSwitchedController
37+
status: Skipped
38+
- controllerName: TODO-other-configObserver
39+
status: Skipped
40+
- controllerName: TODO-other-externalOIDCController
41+
status: Skipped
42+
- controllerName: TODO-payloadConfigController
43+
status: Skipped
44+
- controllerName: TODO-proxyConfigController
45+
status: Skipped
46+
- controllerName: TODO-resourceSyncer
47+
status: Skipped
48+
- controllerName: TODO-routerCertsController
49+
status: Skipped
50+
- controllerName: TODO-serviceCAController
51+
status: Skipped
52+
- controllerName: TODO-staleConditions
53+
status: Skipped
54+
- controllerName: TODO-staticResourceController
55+
status: Skipped
56+
- controllerName: TODO-trustDistributionController
57+
status: Skipped
58+
- controllerName: TODO-webhookAuthController
59+
status: Skipped
60+
- controllerName: TODO-webhookCertsApprover
61+
status: Skipped
62+
- controllerName: TODO-wellKnownReadyController
63+
status: Skipped
64+
- controllerName: TODO-workersAvailableController
65+
status: Skipped
66+
- controllerName: auditPolicyController
67+
status: Skipped
68+
- controllerName: authentication
69+
status: Skipped
70+
- controllerName: openshift-apiserver-APIService
71+
status: Skipped
72+
- controllerName: openshift-oauth-apiserver-EncryptionCondition
73+
status: Skipped
74+
- controllerName: openshift-oauth-apiserver-EncryptionKey
75+
status: Skipped
76+
- controllerName: openshift-oauth-apiserver-EncryptionMigration
77+
status: Skipped
78+
- controllerName: openshift-oauth-apiserver-EncryptionPrune
79+
status: Skipped
80+
- controllerName: openshift-oauth-apiserver-EncryptionState
81+
status: Skipped

0 commit comments

Comments
 (0)