Bug 1812212 - ArgoCD example application cannot be downloaded from github
Summary: ArgoCD example application cannot be downloaded from github
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ISV Operators
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.8.0
Assignee: Tom Buskey
QA Contact: Tom Buskey
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-10 18:57 UTC by Tom Buskey
Modified: 2021-07-27 22:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Example application in operator doesn't work Consequence: Not a smooth path for the user Fix: Provide this simple example: PROJ=younamespace cat > $PROJ-app.yaml <<EOF apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: simple-restricted-webserver namespace: $PROJ spec: destination: namespace: $PROJ server: https://kubernetes.default.svc project: default source: path: basic-nginx repoURL: 'https://github.com/opdev/argocd-example-restricted-apps.git' targetRevision: HEAD EOF oc create -f $PROJ-app.yaml Result: This example application works
Clone Of:
Environment:
Last Closed: 2021-07-27 22:32:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:32:36 UTC

Description Tom Buskey 2020-03-10 18:57:01 UTC
Description of problem:



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 John McKenzie 2020-03-11 14:15:42 UTC
I believe that this is related to the underlying container image for the guestbook application provided by Argo and not related to the actual operator itself. Will double check what the exact issue is with the container image and update.

Comment 5 John McKenzie 2020-04-16 16:48:44 UTC
Hey Tom,

I am struggling a bit with how I can help from the operator perspective. Perhaps this is just a misunderstanding on my part as to the purpose of this testing. The guestbook application is an upstream thing that the operator has no control over. In fact the image that the guestbook example uses is not provided by Argo either. 

From the example repo: https://github.com/argoproj/argocd-example-apps/blob/master/guestbook/guestbook-ui-deployment.yaml

The container image being used is:


gcr.io/heptio-images/ks-guestbook-demo:0.2


The original source for this image I believe is this repo:

https://github.com/kubernetes/examples/tree/master/guestbook

The image appears to not have been made with the more restrictive OpenShift environment in mind. Hence the attempt to bind to port 80.

Please let me know if there is something that I can do to help!

Comment 6 Tom Buskey 2020-04-16 18:02:54 UTC
The test case is to ensure the ArgoCD operator works correctly.

I've gotten far enough to build and install a demo.  But it could not run the example.

IMO, at the least, they chose a wrong example and their documentation is fragile because of it.

@Jian Zhang, do I have enough to prove that things are working?  I'm not sure.

Comment 7 John McKenzie 2020-04-17 13:15:32 UTC
Understood, thanks.

I have been able to get the "sock-shop" example to work. However, it is quite complex compared to the guestbook and requires a cluster with decent resources. I had to give my minikube cluster 6 CPU and 24GB of memory for everything to run. You shouldn't have an issue though if you are using an OpenShift cluster based on the installer with defaults from what I remember.

Comment 8 Jonas Janz 2020-09-08 10:03:37 UTC
Hey @John McKenzie,

do you have the working example of the "sock-shop" available somewhere? I came across this issue when setting up a quick "example" of ArgoCD and realized that 'no' example from the official repo is working out-of-the-box on OpenShift :( 

BR,
Jonas

Comment 9 Jose R. Gonzalez 2021-03-17 22:53:56 UTC
Hi folks!

It's important to make the distinction between resource managed by the ArgoCD Operator (ArgoCD, ArgoCDExport), and resources managed by ArgoCD itself (Application, etc). The ArgoCD operator itself is functional. Instantiating an "ArgoCD" resource works without issue in my testing. To that end, this issue isn't directly related to the operator.

In this particular case, the non-working examples demonstrate an issue with the ArgoCD examples not prepared to run in restricted environments (as mentioned by @jomckenz previously). There's an open issue for it here, but it hasn't seen any traction yet: => https://github.com/argoproj/argocd-example-apps/issues/61

I created a very basic demo workload that you can use to confirm ArgoCD itself can deploy the workload. Here's the resource manifest. You will need to adjust the namespace field(s) accordingly.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  creationTimestamp: null
  name: simple-restricted-webserver
  namespace: argocd
spec:
  destination:
    namespace: argocd
    server: https://kubernetes.default.svc
  project: default
  source:
    path: basic-nginx
    repoURL: https://github.com/opdev/argocd-example-restricted-apps.git
    targetRevision: HEAD

It's just a basic Nginx pod (no guestbook or otherwise), but it demonstrates that the workload can be deployed by ArgoCD. Repo is here ==> https://github.com/opdev/argocd-example-restricted-apps

Comment 10 Tom Buskey 2021-03-18 16:41:17 UTC
I applied this to ArgoCD
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: simple-restricted-webserver
  namespace: argocd
spec:
  destination:
    namespace: argocd
    server: 'https://kubernetes.default.svc'
  project: default
  source:
    path: basic-nginx
    repoURL: 'https://github.com/opdev/argocd-example-restricted-apps.git'
    targetRevision: HEAD

And from the repoURL, I applied basic-nginx-deployment.yaml and  basic-nginx-service.yaml.
Then oc port-forward service/basic-nginx-webserver 8080:8080

lynx --dump http://localhost:8080
                               Welcome to nginx!

   If you see this page, the nginx web server is successfully installed
   and working. Further configuration is required.

   For online documentation and support please refer to [1]nginx.org.
   Commercial support is available at [2]nginx.com.

   Thank you for using nginx.


oc version
Client Version: openshift-clients-4.4.0-202006211643.p0-11-g6be950302
Server Version: 4.4.0-0.nightly-2021-03-17-172050
Kubernetes Version: v1.17.1+5ef953f

Thanks!

Comment 13 errata-xmlrpc 2021-07-27 22:32:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438


Note You need to log in before you can comment on or make changes to this bug.