apiVersion: jenkins.io/v1alpha2
kind: Jenkins
metadata:
  annotations:
  name: jenkins
spec:
  metricsEnabled: true
  configurationAsCode:
    configurations: []
    enabled: true
    defaultConfig: true
    enableAutoReload: true
  roles:
  - name: edit
    kind: ClusterRole
    apiGroup: rbac.authorization.k8s.io
  master:
    containers:
    - name: jenkins
      env:
      - name: OPENSHIFT_ENABLE_OAUTH
        value: 'true'
      - name: OPENSHIFT_ENABLE_REDIRECT_PROMPT
        value: 'true'
      - name: DISABLE_ADMINISTRATIVE_MONITORS
        value: 'false'
      - name: KUBERNETES_MASTER
        value: 'https://kubernetes.default:443'
      - name: KUBERNETES_TRUST_CERTIFICATES
        value: 'true'
      - name: JENKINS_UC_INSECURE
        value: 'false'
      - name: JENKINS_HOME
        value: /var/lib/jenkins
      - name: JENKINS_JAVA_OVERRIDES
        value: >-
          -XX:+UnlockExperimentalVMOptions -XX:+UnlockExperimentalVMOptions
          -XX:MaxRAMFraction=1
          -Djenkins.install.runSetupWizard=false -Djava.awt.headless=true
          -Dhudson.security.csrf.DefaultCrumbIssuer.EXCLUDE_SESSION_ID=true
          -Dcasc.reload.token=$(POD_NAME)
      image: 'quay.io/redhat-developer/origin-jenkins@sha256:a8e94991bd42290c51310ad1d34554f1d1604813a9f15f8acf96e18f71ff65c7'
  serviceAccount:
    annotations:
      serviceaccounts.openshift.io/oauth-redirectreference.jenkins: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"jenkins-operator"}}'
    
