Skip to content

Commit

Permalink
fixup! Certificate support for image registry
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Short <tshort@redhat.com>
  • Loading branch information
tmshort committed Jun 22, 2024
1 parent 6155df5 commit 875a278
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/httputil/httputil.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func LoadCerts(caDir string) (string, error) {
return err
}
if info.IsDir() {
return nil
return filepath.SkipDir
}
data, err := os.ReadFile(path)
if err != nil {
Expand Down
36 changes: 35 additions & 1 deletion scripts/install.tpl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,41 @@ function kubectl_wait() {
kubectl apply -f "https://github.com/cert-manager/cert-manager/releases/download/${cert_mgr_version}/cert-manager.yaml"
kubectl_wait "cert-manager" "deployment/cert-manager-webhook" "60s"

kubectl apply -f testdata/certs/issuers.yaml
# Create a self-signed ClusterIssuer
kubectl apply -f <<EOF
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: self-sign-issuer
namespace: cert-manager
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: olmv1-ca
namespace: cert-manager
spec:
isCA: true
commonName: olmv1-ca
secretName: olmv1-ca
privateKey:
algorithm: ECDSA
size: 256
issuerRef:
name: self-sign-issuer
kind: Issuer
group: cert-manager.io
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: olmv1-ca
spec:
ca:
secretName: olmv1-ca
EOF

kubectl apply -f "https://github.com/operator-framework/catalogd/releases/download/${catalogd_version}/catalogd.yaml"
kubectl_wait "olmv1-system" "deployment/catalogd-controller-manager" "60s"
Expand Down

0 comments on commit 875a278

Please sign in to comment.