Artifactory Operator v1.1.1 upgrade path fixed

This commit is contained in:
John Peterson
2020-10-06 16:02:04 -07:00
parent bee654559c
commit b086f3e4e1
22 changed files with 912 additions and 1274 deletions

View File

@@ -1,6 +1,10 @@
# JFrog Openshift Artifactory-ha Chart Changelog
All changes to this chart will be documented in this file.
## [1.1.1] - Oct 6, 2020
* Upgrade path fixed for both operator version 1.0.3 and 1.1.0
* Updating Operator to latest jfrog/artifactory-ha helm chart version 4.2.0 artifactory version 7.9.0
## [1.1.0] - Sept 30, 2020
* Updating Operator to latest jfrog/artifactory-ha helm chart version 4.1.0 artifactory version 7.9.0

View File

@@ -4,11 +4,14 @@ This code base is intended to deploy Artifactory HA as an operator to an Openshi
Openshift OperatorHub has the latest official supported Cluster Service Version (CSV) for the OLM catalog.
# Breaking Changes
```
v1.1.0 breaks existing upgrade path due to base helm chart breaking changes
```
## Security Context Constraints
To deploy this helm chart you will need to be a cluster admin w/ access to the anyuid scc.
````bash
oc adm policy add-scc-to-user anyuid -z artifactory-ha-operator
````
## Getting Started

View File

@@ -1,6 +1,7 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: openshiftartifactoryhas.charts.helm.k8s.io
spec:
group: charts.helm.k8s.io
@@ -15,9 +16,14 @@ spec:
validation:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
status:
acceptedNames:
kind: ''
plural: ''
conditions: null
storedVersions: null

View File

@@ -0,0 +1,12 @@
annotations:
operators.operatorframework.io.bundle.channel.default.v1: alpha
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: openshiftartifactoryha-operator
operators.operatorframework.io.metrics.builder: operator-sdk-v1.0.1
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: helm.sdk.operatorframework.io/v1
operators.operatorframework.io.test.config.v1: tests/scorecard/
operators.operatorframework.io.test.mediatype.v1: scorecard+v1

View File

@@ -0,0 +1,5 @@
channels:
- currentCSV: artifactory-ha-operator.v1.1.1
name: alpha
defaultChannel: ''
packageName: openshiftartifactoryha-operator

View File

@@ -0,0 +1,29 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: openshiftartifactoryhas.charts.helm.k8s.io
spec:
group: charts.helm.k8s.io
names:
kind: OpenshiftArtifactoryHa
listKind: OpenshiftArtifactoryHaList
plural: openshiftartifactoryhas
singular: openshiftartifactoryha
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
type: object
version: v1alpha1
versions:
- name: v1alpha1
served: true
storage: true
status:
acceptedNames:
kind: ''
plural: ''
conditions: null
storedVersions: null

View File

@@ -0,0 +1,19 @@
FROM scratch
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=openshiftartifactoryha-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.0.1
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=helm.sdk.operatorframework.io/v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
COPY 1.1.1/manifests /manifests/
COPY 1.1.1/metadata /metadata/
LABEL com.redhat.openshift.versions="v4.5,v4.6"
LABEL com.redhat.delivery.operator.bundle=true
LABEL com.redhat.delivery.backport=true

View File

@@ -1,4 +0,0 @@
packageName: openshiftartifactoryha-operator
channels:
- name: alpha
currentCSV: artifactory-ha-operator.v1.0.3

View File

@@ -14,7 +14,7 @@ metadata:
"artifactory-ha": {
"artifactory": {
"image": {
"registry": "registry.connect.redhat.com"
"registry": "registry.connect.redhat.com",
"repository": "jfrog/artifactory-pro",
"tag": "7.9.0"
},
@@ -28,6 +28,7 @@ metadata:
}
}
},
"databaseUpgradeReady": true,
"database": {
"driver": "OVERRIDE",
"password": "OVERRIDE",
@@ -68,14 +69,14 @@ metadata:
capabilities: Seamless Upgrades
categories: Developer Tools,Integration & Delivery
certified: "true"
containerImage: registry.connect.redhat.com/jfrog/artifactory-operator:7.9.0
containerImage: registry.connect.redhat.com/jfrog/artifactory-operator:7.9
createdAt: 2020-03-25 00:00:00+00:00
description: JFrog Artifactory Enterprise deploys Artifactory in a high availability environment across multiple pods
operators.operatorframework.io/builder: operator-sdk-v1.0.1
operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1
repository: https://github.com/jfrog/JFrog-Cloud-Installers/tree/openshift4/Openshift4
support: JFrog
name: artifactory-ha-operator.v1.1.0
name: artifactory-ha-operator.v1.1.1
namespace: default
spec:
apiservicedefinitions: {}
@@ -112,6 +113,12 @@ spec:
## Overview
Openshift Operator to deploy JFrog Artifactory Enterprise into your Openshift cluster.
## Security Context Constraints
To deploy this helm chart you will need to be a cluster admin w/ access to the anyuid scc and add the operator service account to the anyuid scc.
````oc adm policy add-scc-to-user anyuid -z artifactory-ha-operator ````
## Usage
An external DB is required. The operator will not deploy a DB but will require you to specify the configuration values to connect to it.
@@ -173,7 +180,7 @@ spec:
value: registry.connect.redhat.com/jfrog/artifactory-pro:7.9.0
- name: RELATED_IMAGE_NGINX_IMAGE_REPOSITORY
value: registry.redhat.io/rhel8/nginx-116:latest
image: registry.connect.redhat.com/jfrog/artifactory-operator:7.9.0
image: registry.connect.redhat.com/jfrog/artifactory-operator:7.9
imagePullPolicy: Always
name: artifactory-ha-operator
resources: {}
@@ -336,5 +343,5 @@ spec:
maturity: alpha
provider:
name: JFrog
replaces: artifactory-ha-operator.v1.0.3
version: 1.1.0
replaces: artifactory-ha-operator.v1.1.0
version: 1.1.1

View File

@@ -1,6 +1,10 @@
# JFrog Openshift Artifactory-ha Chart Changelog
All changes to this chart will be documented in this file.
## [4.2.0] - Oct 6, 2020
* Fixed upgrade path from 3.1.0 to 4.2.0
* Updating to latest jfrog/artifactory-ha helm chart version 4.2.0 artifactory version 7.9.0
## [4.1.0] - Sept 30, 2020
* Updating to latest jfrog/artifactory-ha helm chart version 4.1.0 artifactory version 7.9.0

View File

@@ -16,4 +16,4 @@ name: openshift-artifactory-ha
sources:
- https://bintray.com/jfrog/product/JFrog-Artifactory-Pro/view
- https://github.com/jfrog/charts
version: 4.1.0
version: 4.2.0

View File

@@ -16,6 +16,15 @@ artifactory-ha.artifactory.node.replicaCount
```
This is due to helm referencing them through the subchart artifactory-ha now.
## Security Context Constraints
To deploy this helm chart you will need to be a cluster admin w/ access to the anyuid scc.
````bash
oc adm policy add-scc-to-user anyuid -z my_user_name
````
## Prerequisites Details
* Kubernetes 1.12+

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# install via helm with default postgresql configuration
helm upgrade --install artifactory-ha . \
--set artifactory-ha.nginx.service.ssloffload=true \
--set artifactory-ha.nginx.tlsSecretName=tls-ingress \
--set artifactory-ha.artifactory.node.replicaCount=1 \
--set artifactory-ha.artifactory.license.secret=artifactory-license,artifactory-ha.artifactory.license.dataKey=artifactory.cluster.license \
--set artifactory-ha.database.type=postgresql \
--set artifactory-ha.database.driver=org.postgresql.Driver \
--set artifactory-ha.database.url=jdbc:postgresql://postgres-postgresql:5432/artifactory \
--set artifactory-ha.database.user=artifactory \
--set artifactory-ha.database.password=password \
--set artifactory-ha.artifactory.joinKey=EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE \
--set artifactory-ha.artifactory.masterKey=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF \
--set artifactory-ha.databaseUpgradeReady=true

View File

@@ -1,6 +1,6 @@
dependencies:
- name: artifactory-ha
repository: https://charts.jfrog.io/
version: 4.1.0
digest: sha256:8df1fd70eeabbb7687da0dd534d2161a413389ec40f331d5eb8e95ae50119222
generated: "2020-09-30T12:30:08.142288-07:00"
version: 4.2.0
digest: sha256:c5d4c457266ce8d7e0e8c6dcf326267c3ca4cbb8a03c81db68a8a0b45fde3d3e
generated: "2020-10-06T15:10:01.551465-07:00"

View File

@@ -1,4 +1,4 @@
dependencies:
- name: artifactory-ha
version: 4.1.0
version: 4.2.0
repository: https://charts.jfrog.io/

View File

@@ -3,9 +3,7 @@
# and applies various things like initContainers, nginx mainConf, etc
# to enable the artifactory-ha helm chart to work in an openshift environment
artifactory-ha:
###################################
# EDIT TO YOUR DB CONFIGURATION
###################################
databaseUpgradeReady: true
database:
type: "OVERRIDE"
driver: "OVERRIDE"
@@ -28,6 +26,20 @@ artifactory-ha:
enabled: false
masterKey: "OVERRIDE"
joinKey: "OVERRIDE"
customInitContainersBegin: |
- name: "prepare-uid-persistent-volume"
image: "{{ .Values.initContainerImage }}"
imagePullPolicy: "{{ .Values.artifactory.image.pullPolicy }}"
command:
- 'sh'
- '-c'
- >
chown -Rv {{ .Values.artifactory.uid }}:{{ .Values.artifactory.uid }} {{ .Values.artifactory.persistence.mountPath }}
securityContext:
runAsUser: 0
volumeMounts:
- mountPath: "{{ .Values.artifactory.persistence.mountPath }}"
name: volume
postgresql:
enabled: false
nginx: