goHarbor set auth_mode when deploying K8s cluster

3/16/2020

I'm running an instance with K8s, Keycloak and goHarbor which are supposed to connect via OIDC. I would like to deploy goHarbor including the OIDC authentication settings but have been unable to find a working solution yet. Adding the Keycloak credentials adds the following entries in the goHarbor PostgreSQL database in the pod testing-harbor-database:

-- Data for Name: oidc_user; Type: TABLE DATA; Schema: public; Owner: postgres
-- Name: oidc_user_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
SELECT pg_catalog.setval('public.oidc_user_id_seq', 1, false);
INSERT INTO public.properties VALUES (1, 'oidc_client_secret', 'xxx');
INSERT INTO public.properties VALUES (2, 'auth_mode', 'oidc_auth');
INSERT INTO public.properties VALUES (3, 'oidc_client_id', 'goharbor');
INSERT INTO public.properties VALUES (4, 'oidc_endpoint', 'www');
INSERT INTO public.properties VALUES (5, 'oidc_name', 'keycloak');
INSERT INTO public.properties VALUES (6, 'oidc_scope', 'openid,offline_access');
INSERT INTO public.properties VALUES (7, 'oidc_verify_cert', 'false');

How can I add these database entries while telling goHarbor to use them when starting the pod? Ideally I would like to delete goHarbor and deploy it being completely set up.

-- Pulz
kubernetes

0 Answers